jerrypeng commented on a change in pull request #7647:
URL: https://github.com/apache/pulsar/pull/7647#discussion_r459710411
##########
File path:
pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java
##########
@@ -317,9 +319,15 @@ public static FunctionConfig
convertFromDetails(FunctionDetails functionDetails)
}
if (functionDetails.getSource().getSubscriptionType() ==
Function.SubscriptionType.FAILOVER) {
functionConfig.setRetainOrdering(true);
+ functionConfig.setRetainKeyOrdering(false);
functionConfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE);
+ } else if (functionDetails.getSource().getSubscriptionType() ==
Function.SubscriptionType.KEY_SHARED) {
+ functionConfig.setRetainOrdering(false);
+ functionConfig.setRetainKeyOrdering(true);
+
functionConfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.ATLEAST_ONCE);
Review comment:
We are we assuming ATLEAST_ONCE here? A user can set the processing
guarantee to be at most once and still set the retain ordering to be true
##########
File path:
pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java
##########
@@ -317,9 +319,15 @@ public static FunctionConfig
convertFromDetails(FunctionDetails functionDetails)
}
if (functionDetails.getSource().getSubscriptionType() ==
Function.SubscriptionType.FAILOVER) {
functionConfig.setRetainOrdering(true);
+ functionConfig.setRetainKeyOrdering(false);
functionConfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE);
+ } else if (functionDetails.getSource().getSubscriptionType() ==
Function.SubscriptionType.KEY_SHARED) {
+ functionConfig.setRetainOrdering(false);
+ functionConfig.setRetainKeyOrdering(true);
+
functionConfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.ATLEAST_ONCE);
Review comment:
Why are we assuming ATLEAST_ONCE here? A user can set the processing
guarantee to be at most once and still set the retain ordering to be true
----------------------------------------------------------------
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:
[email protected]