Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def ack(self, offset: int):
if receipt == ack:
prefix_acked_offset = receipt
continue
self._receipts.append(receipt)
self._receipts.appendleft(receipt)
self._acks.put(ack)
break
if prefix_acked_offset is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ async def test_track_and_aggregate_acks(committer, tracker: AckSetTracker):
committer.commit.assert_has_calls([])
await tracker.ack(offset=3)
committer.commit.assert_has_calls([])
await tracker.ack(offset=5)
committer.commit.assert_has_calls([])
await tracker.ack(offset=1)
committer.commit.assert_has_calls([call(Cursor(offset=6))])
committer.commit.assert_has_calls([call(Cursor(offset=4))])
await tracker.ack(offset=5)
committer.commit.assert_has_calls(
[call(Cursor(offset=4)), call(Cursor(offset=6))]
)

tracker.track(offset=8)
await tracker.ack(offset=7)
committer.commit.assert_has_calls(
[call(Cursor(offset=6)), call(Cursor(offset=8))]
[call(Cursor(offset=4)), call(Cursor(offset=6)), call(Cursor(offset=8))]
)
committer.__aexit__.assert_called_once()

Expand Down