Skip to content

Commit d288eee

Browse files
committed
comment
1 parent aa9b9d1 commit d288eee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/logrepl/cdc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ type CDCIterator struct {
4949

5050
// batchesCh is a channel shared between this iterator and a CDCHandler,
5151
// to which the CDCHandler is sending batches of records.
52+
// Using a shared queue here would be the fastest option. However,
53+
// we also need to watch for a context that can get cancelled,
54+
// and for the subscription that can end, so using a channel is
55+
// the best option at the moment.
5256
batchesCh chan []opencdc.Record
5357

5458
// recordsForNextRead contains records from the previous batch (returned by the CDCHandler),

0 commit comments

Comments
 (0)