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 2020/06/29 18:13:46 UTC

[GitHub] [pulsar] srkukarni commented on a change in pull request #7377: Functions metadata compaction

srkukarni commented on a change in pull request #7377:
URL: https://github.com/apache/pulsar/pull/7377#discussion_r447160507



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionMetaDataManager.java
##########
@@ -290,26 +307,48 @@ public synchronized void giveupLeadership() {
      */
     public void processMetaDataTopicMessage(Message<byte[]> message) throws IOException {
         try {
-            Request.ServiceRequest serviceRequest = Request.ServiceRequest.parseFrom(message.getData());
-            if (log.isDebugEnabled()) {
-                log.debug("Received Service Request: {}", serviceRequest);
-            }
-            switch (serviceRequest.getServiceRequestType()) {
-                case UPDATE:
-                    this.processUpdate(serviceRequest.getFunctionMetaData());
-                    break;
-                case DELETE:
-                    this.proccessDeregister(serviceRequest.getFunctionMetaData());
-                    break;
-                default:
-                    log.warn("Received request with unrecognized type: {}", serviceRequest);
+            if (workerConfig.getCompactMetadataTopic()) {

Review comment:
       actually prefer explicit setting. 
   Plus with this change, key is being set for whether you are compacting the topic or not




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

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