cscotta commented on code in PR #4707:
URL: https://github.com/apache/cassandra/pull/4707#discussion_r3037155873


##########
src/java/org/apache/cassandra/db/ReadResponse.java:
##########
@@ -239,9 +244,15 @@ private LocalDataResponse(UnfilteredPartitionIterator 
iter, ColumnFilter selecti
 
         private static ByteBuffer build(UnfilteredPartitionIterator iter, 
ColumnFilter selection)
         {
-            try (DataOutputBuffer buffer = new DataOutputBuffer())
+            // Size output buffer to 10% above the moving average to absorb 
minor variance and limit rebuffering.
+            double bufferSizeEstimate = 
Double.isNaN(estimatedResponseBytes.get()) ? 128 : estimatedResponseBytes.get();

Review Comment:
   Good catch, addressed in 
https://github.com/apache/cassandra/pull/4707/changes/df95df14e358e6d7d44420d882a96922530c9eb5.



-- 
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