-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: session sum example #111
Conversation
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
var eofResponse *v1.ReduceResponse | ||
for _, task := range rtm.tasks { | ||
tasks = append(tasks, task) | ||
} | ||
|
||
for _, task := range tasks { | ||
<-task.doneCh | ||
if eofResponse == nil { | ||
eofResponse = task.buildEOFResponse() | ||
} | ||
} | ||
rtm.responseCh <- eofResponse | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a behaviour change? Before, each task, if not merged, sends its own EOFResponse to responseCh. After, when receiving an EOF, we loop through the active tasks and only send the last EOFResponse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should include verifying EOF in our unit tests. Currently, we are not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving as this is sort of urgent. We can address the unit test comment as a separate issue: #113
fixes #110