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 2021/11/20 13:20:12 UTC

[GitHub] [pulsar] nodece commented on a change in pull request #12625: [Sink] Fix the marshal and unmarshal the sink config

nodece commented on a change in pull request #12625:
URL: https://github.com/apache/pulsar/pull/12625#discussion_r753674675



##########
File path: pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/SinkConfigUtils.java
##########
@@ -278,18 +275,24 @@ public static SinkConfig convertFromDetails(FunctionDetails functionDetails) {
         if (!isEmpty(functionDetails.getSource().getSubscriptionName())) {
             sinkConfig.setSourceSubscriptionName(functionDetails.getSource().getSubscriptionName());
         }
-        if (functionDetails.getSource().getSubscriptionType() == Function.SubscriptionType.FAILOVER) {
-            sinkConfig.setRetainOrdering(true);
-            sinkConfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE);
-        } else {
-            sinkConfig.setRetainOrdering(false);
-            sinkConfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.ATLEAST_ONCE);
+
+        switch (functionDetails.getSource().getSubscriptionType()) {
+            case SHARED:
+                sinkConfig.setRetainOrdering(false);
+                break;
+            case FAILOVER:
+                sinkConfig.setRetainOrdering(true);
+                break;

Review comment:
       I should add default case that `sinkConfig.setRetainOrdering(false)`.
   




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