zuston commented on code in PR #11059:
URL: 
https://github.com/apache/incubator-gluten/pull/11059#discussion_r2525662976


##########
cpp/core/shuffle/rss/RssPartitionWriter.cc:
##########
@@ -70,36 +60,25 @@ arrow::Status RssPartitionWriter::hashEvict(
 arrow::Status
 RssPartitionWriter::sortEvict(uint32_t partitionId, 
std::unique_ptr<InMemoryPayload> inMemoryPayload, bool isFinal) {
   ScopedTimer timer(&spillTime_);
-  if (lastEvictedPartitionId_ != partitionId) {
-    if (lastEvictedPartitionId_ != -1) {
-      GLUTEN_DCHECK(rssOs_ != nullptr && !rssOs_->closed(), "rssOs_ should not 
be null");
-      if (compressedOs_ != nullptr) {
-        RETURN_NOT_OK(compressedOs_->Flush());
-      }
-
-      ARROW_ASSIGN_OR_RAISE(const auto buffer, rssOs_->Finish());
-      bytesEvicted_[lastEvictedPartitionId_] +=
-          rssClient_->pushPartitionData(lastEvictedPartitionId_, 
buffer->data_as<char>(), buffer->size());
-    }
-
-    ARROW_ASSIGN_OR_RAISE(
-        rssOs_, 
arrow::io::BufferOutputStream::Create(options_->pushBufferMaxSize, 
arrow::default_memory_pool()));
-    if (codec_ != nullptr) {
-      ARROW_ASSIGN_OR_RAISE(
-          compressedOs_,
-          ShuffleCompressedOutputStream::Make(
-              codec_.get(), options_->compressionBufferSize, rssOs_, 
arrow::default_memory_pool()));
-    }
-
-    lastEvictedPartitionId_ = partitionId;
-  }
-
   rawPartitionLengths_[partitionId] += inMemoryPayload->rawSize();
-  if (compressedOs_ != nullptr) {
-    RETURN_NOT_OK(inMemoryPayload->serialize(compressedOs_.get()));
+  ARROW_ASSIGN_OR_RAISE(
+      auto rssOs, 
arrow::io::BufferOutputStream::Create(options_->pushBufferMaxSize, 
arrow::default_memory_pool()));
+  if (codec_ != nullptr) {
+    ARROW_ASSIGN_OR_RAISE(

Review Comment:
   > make sense, celeborn also don't need to compress again IMO, let me remove 
it as well.
   
   Maybe disabling compression on the Celeborn side by config(if having this 
option) is sufficient, and there is no need to implicitly disable it in the 
Gluten codebase.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to