jenrryyou commented on code in PR #2889:
URL: https://github.com/apache/brpc/pull/2889#discussion_r1948099460


##########
src/brpc/stream.cpp:
##########
@@ -154,18 +173,54 @@ ssize_t Stream::CutMessageIntoFileDescriptor(int /*fd*/,
     }
     butil::IOBuf out;
     ssize_t len = 0;
+    ssize_t unwritten_data_size = 0;
     for (size_t i = 0; i < size; ++i) {
-        StreamFrameMeta fm;
-        fm.set_stream_id(_remote_settings.stream_id());
-        fm.set_source_stream_id(id());
-        fm.set_frame_type(FRAME_TYPE_DATA);
-        // TODO: split large data
-        fm.set_has_continuation(false);
-        policy::PackStreamMessage(&out, fm, data_list[i]);
-        len += data_list[i]->length();
-        data_list[i]->clear();
+        butil::IOBuf *data = data_list[i];
+        size_t length = data->length();
+        if(length > FLAGS_stream_write_max_segment_size) {

Review Comment:
   已改



-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to