Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLUTEN-6923][CH] total_bytes_written is not updated in celeborn partition writers #6939

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cpp-ch/local-engine/Shuffle/PartitionWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ size_t MemorySortCelebornPartitionWriter::evictPartitions()
celeborn_client->pushPartitionData(cur_partition_id, data.data(), data.size());
shuffle_writer->split_result.total_io_time += push_time_watch.elapsedNanoseconds();
shuffle_writer->split_result.partition_lengths[cur_partition_id] += data.size();
shuffle_writer->split_result.total_bytes_written += data.size();
}
output.restart();
};
Expand Down Expand Up @@ -586,6 +587,7 @@ size_t CelebornPartitionWriter::evictSinglePartition(size_t partition_id)
shuffle_writer->split_result.total_write_time += push_time_watch.elapsedNanoseconds();
shuffle_writer->split_result.total_io_time += push_time_watch.elapsedNanoseconds();
shuffle_writer->split_result.total_serialize_time += serialization_time_watch.elapsedNanoseconds();
shuffle_writer->split_result.total_bytes_written += written_bytes;
};

Stopwatch spill_time_watch;
Expand Down
5 changes: 5 additions & 0 deletions cpp-ch/local-engine/local_engine_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ JNIEXPORT jobject Java_org_apache_gluten_vectorized_CHShuffleSplitterJniWrapper_
const auto * raw_src = reinterpret_cast<const jlong *>(raw_partition_lengths.data());
env->SetLongArrayRegion(raw_partition_length_arr, 0, raw_partition_lengths.size(), raw_src);

// AQE has dependency on total_bytes_written, if the data is wrong, it will generate inappropriate plan
// add a log here for remining this.
if (!result.total_bytes_written)
LOG_WARNING(getLogger("_CHShuffleSplitterJniWrapper"), "total_bytes_written is 0, something may be wrong");

jobject split_result = env->NewObject(
split_result_class,
split_result_constructor,
Expand Down
Loading