Fix Kafka ConsumeClaim loop to Mark right offset#645
Fix Kafka ConsumeClaim loop to Mark right offset#645n3wscott merged 1 commit intocloudevents:masterfrom
Conversation
Signed-off-by: Matthieu Bernardin <matt.bernardin@gmail.com>
|
Wanna double check @n3wscott? |
n3wscott
left a comment
There was a problem hiding this comment.
There is no go call, so there is no fork and the closure fix does not seem to be required. I do not see how this code is any different than what was before. Add a test?
But the message is pushed inside a channel and used later, i think that's the issue here |
|
I think it is related to the anonymous function: Edit (2)
for plouf := range myChannel {
go myFunction(&plouf)
}which is more obvious, but exactly the same, ie we don't control when the function is being called (relatively to the for loop) https://play.golang.org/p/z5qVb776T-u |
|
LGTM |
#643
message is a pointer varying in the for loop, when MarkMessage is called, the pointer points to something potentially different to the current iteration
Signed-off-by: Matthieu Bernardin matt.bernardin@gmail.com