GumpacG commented on code in PR #3419:
URL: https://github.com/apache/tinkerpop/pull/3419#discussion_r3245231535


##########
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java:
##########
@@ -240,11 +257,22 @@ public void configure(final ChannelPipeline pipeline) {
                     DEFAULT_ALLOW_DUPLICATE_CONTENT_LENGTHS, false);
 
             pipeline.addLast(PIPELINE_HTTP_CODEC, handler);
-            pipeline.addLast(PIPELINE_HTTP_AGGREGATOR, new 
HttpObjectAggregator(cluster.getMaxResponseContentLength() > 0
-                    ? (int) cluster.getMaxResponseContentLength() : 
Integer.MAX_VALUE));
-            pipeline.addLast(PIPELINE_HTTP_ENCODER, gremlinRequestEncoder);
-            pipeline.addLast(PIPELINE_HTTP_DECOMPRESSION_HANDLER, 
httpCompressionDecoder);
-            pipeline.addLast(PIPELINE_HTTP_DECODER, gremlinResponseDecoder);
+            if (useStreaming) {
+                pipeline.addLast(PIPELINE_HTTP_DECOMPRESSION_HANDLER, 
httpCompressionDecoder);
+                pipeline.addLast(PIPELINE_HTTP_DECODER, 
streamingResponseHandler);
+                pipeline.addLast(PIPELINE_HTTP_ENCODER, gremlinRequestEncoder);
+            } else {
+                pipeline.addLast(PIPELINE_HTTP_AGGREGATOR, new 
HttpObjectAggregator(cluster.getMaxResponseContentLength() > 0
+                        ? (int) cluster.getMaxResponseContentLength() : 
Integer.MAX_VALUE));
+                pipeline.addLast(PIPELINE_HTTP_ENCODER, gremlinRequestEncoder);
+                pipeline.addLast(PIPELINE_HTTP_DECOMPRESSION_HANDLER, 
httpCompressionDecoder);
+                pipeline.addLast(PIPELINE_HTTP_DECODER, 
gremlinResponseDecoder);
+            }

Review Comment:
   nit:
   
   ```suggestion
               if (!useStreaming) {
                   pipeline.addLast(PIPELINE_HTTP_AGGREGATOR, new 
HttpObjectAggregator(cluster.getMaxResponseContentLength() > 0
                           ? (int) cluster.getMaxResponseContentLength() : 
Integer.MAX_VALUE));
               }
               pipeline.addLast(PIPELINE_HTTP_DECOMPRESSION_HANDLER, 
httpCompressionDecoder);
               pipeline.addLast(PIPELINE_HTTP_DECODER, 
streamingResponseHandler);
               pipeline.addLast(PIPELINE_HTTP_ENCODER, gremlinRequestEncoder);
   ```
   



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

Reply via email to