Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
Signed-off-by: Yashash H L <[email protected]>
  • Loading branch information
yhl25 committed Oct 30, 2024
1 parent f681938 commit dfa1117
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/sourcer/examples/simple_source/impl/simple_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ func (s *SimpleSource) Read(_ context.Context, readRequest sourcesdk.ReadRequest
func (s *SimpleSource) Ack(_ context.Context, request sourcesdk.AckRequest) {
s.lock.Lock()
defer s.lock.Unlock()
offset := deserializeOffset(request.Offset().Value())
delete(s.toAckSet, offset)
for _, offset := range request.Offsets() {
delete(s.toAckSet, deserializeOffset(offset.Value()))
}
}

func (s *SimpleSource) Partitions(_ context.Context) []int32 {
Expand Down

0 comments on commit dfa1117

Please sign in to comment.