sjwiesman commented on a change in pull request #303:
URL: https://github.com/apache/flink-statefun/pull/303#discussion_r813245835



##########
File path: statefun-sdk-go/v3/pkg/statefun/context.go
##########
@@ -76,6 +81,12 @@ func (s *statefunContext) Storage() AddressScopedStorage {
        return s.storage
 }
 
+func (s *statefunContext) WithContext(ctx context.Context) Context {
+       newContext := *s
+       newContext.Context = ctx
+       return &newContext

Review comment:
       The statefun context very explicitly has shared state. It is effectively 
building the return payload from the batch of messages. Self is static for all 
messages in the batch. Caller is message specific, but from user code 
perspective both are immutable for the full invocation. 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to