You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/08 10:07:55 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16888: [improve][broker] Add gzip compression before http service response

codelipenghui commented on code in PR #16888:
URL: https://github.com/apache/pulsar/pull/16888#discussion_r940062040


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/web/WebServiceTest.java:
##########
@@ -416,6 +430,7 @@ private void setupEnv(boolean enableFilter, String minApiVersion, boolean allowU
         config.setAdvertisedAddress("localhost"); // TLS certificate expects localhost
         config.setMetadataStoreUrl("zk:localhost:2181");
         config.setHttpMaxRequestSize(10 * 1024);
+        config.setEnableCompressMetricsData(true);

Review Comment:
   This will change all the tests in this class run with compression enabled, and no tests to cover the case of without compression



##########
conf/broker.conf:
##########
@@ -833,6 +833,9 @@ maxHttpServerConnections=2048
 # Max concurrent web requests
 maxConcurrentHttpRequests=1024
 
+# enable compression metrics data when the HTTP service responds to the client
+enableCompressMetricsData=false

Review Comment:
   compressOutputMetricsInPrometheus=false
   
   Just make the name consistent with the existing flags of prometheus
   
   And please move it under the `### --- Metrics --- ###` section



##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/web/WebServiceTest.java:
##########
@@ -349,6 +349,20 @@ public void testBrokerReady() throws Exception {
         assertEquals(res.getResponseBody(), "ok");
     }
 
+    @Test
+    public void testCompressMetricsData() throws Exception {

Review Comment:
   Is it able to check whether the data has been compressed? I think the test can also get passed if the flag is disabled.



-- 
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: commits-unsubscribe@pulsar.apache.org

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