-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
QE 2022-10-17, QE 2022-10-31, QE 2022-11-14, QE 2022-11-28, QE 2022-12-12
-
5
While working on SERVER-66840 we discovered the issue with the test jstests/change_streams/only_wake_getmore_for_relevant_changes.js
The issue is that it was agreed that change collections are majority committed by design. In this case the regular insert_listeners do not work with change collections as desired, as they wake the listeners based on local writes. This results in redundant wakes and no documents being returned to the client, as when local write is performed, the write is not guaranteed to be majority committed just yet.
Oplog works around this issue by having extra signaling mechanism that wakes up upon timestamp advancement in oplog.
The decided solution to this issue is to make tailable awaitable cursors on collections (not only change collection or oplog) that have read concern majority to wait on majority point advacement notification instead of waiting for the local writes provided by the capped notifier.
louis.williams@mongodb.com has implemented a prototype to solve a similar problem https://evergreen.mongodb.com/filediff/62e15eaf7742ae1d62082175/?patch_number=0
- is related to
-
SERVER-66840 Investigate and fix testcases
- Closed
- related to
-
SERVER-74526 Change stream opened against a secondary node uses a lot of CPU even when there is no write load
- Closed
-
SERVER-74580 Complete TODO listed in SERVER-69959
- Closed
-
SERVER-71161 Investigate removal of `signalOplogWaiters` in favor of majority committed point notification
- Closed
-
SERVER-74555 Re-introduce majority commit point advancement notification mechanism and use for change streams
- Closed