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 2018/12/20 02:14:02 UTC

[GitHub] ngjaying commented on issue #3208: Is state shared by function instances?

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:
users@infra.apache.org


With regards,
Apache Git Services