ngjaying commented on issue #3208: Is state shared by function instances?
URL: https://github.com/apache/pulsar/issues/3208#issuecomment-448833291
 
 
   OK. I am concerned about the Read-Modify-Write scenario. For below scenario, 
given the initial value for state.key = "value". If the function has the below 
logic:
   `
   String currentValue = context.getState("key"); 
   context.putState("key", currentValue + context.getInstanceId);
   `
   If this function is run with --parallelism 2. Is this read-modify-write run 
like a database transaction? If not, is there a best practice for such scenario.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to