Reduce latency for MongoDB streaming in high transactions/second environments [DBZ-2713]
- Dominant language
- HTML
- Stars
- 6
- Forks
- 9
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
Migrated from [DBZ-2713](https://issues.redhat.com/browse/DBZ-2713)
The connector uses a {{tryNext}} call to the MongoDB Cursor which is created using a {{TailableAwait}} type configuration. The documentation for this cursor type seems to indicate that MongoDB will apply its own "pause" mechanism if the batch it returns is empty to avoid high cpu utilization for loops that use this non-blocking IO strategy. If that's indeed the case, the Metronome isn't required and only adds additional latency that could be eliminated for high transactions/second environments to reduce event latency.
See conversation https://gitter.im/debezium/user?at=5f9c3715d5a5a635f28eb78e
Contributor guide
Research direction
Start by tracing the connector's MongoDB Cursor usage around the tryNext call, TailableAwait configuration, and Metronome, then review the linked DBZ-2713 report and Gitter conversation. Verify whether MongoDB already provides the needed pause behavior and measure event latency in high-transactions-per-second conditions; done means the latency impact and required Metronome behavior are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100