rayman7718 commented on a change in pull request #1580:
URL: https://github.com/apache/samza/pull/1580#discussion_r809595188



##########
File path: samza-core/src/main/java/org/apache/samza/container/RunLoop.java
##########
@@ -239,8 +260,22 @@ private void runTasks(IncomingMessageEnvelope envelope) {
     if (!shutdownNow) {
       if (envelope != null) {
         PendingEnvelope pendingEnvelope = new PendingEnvelope(envelope);
-        for (AsyncTaskWorker worker : 
sspToTaskWorkerMapping.get(envelope.getSystemStreamPartition())) {
-          worker.state.insertEnvelope(pendingEnvelope);
+        // when elasticity is enabled
+        // the tasks actually consume a keyBucket of the ssp.
+        // hence use the SSP with keybucket to find the worker(s) for the 
envelope

Review comment:
       Could we add a comment to indicate why a SSP+keyBucket can map to more 
than one workers?




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