[SERVER-53119] OplogBuffer should throw the buffer shutdown error for push/peek calls if the buffer was signaled to shutdown Created: 30/Nov/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Suganthi Mani Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: former-quick-wins
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Participants:

 Description   

Currently, there is no contract in which order the oplog buffer should get shutdown relative to oplog fetcher (producer) and oplog applier(consumer) component. This can lead to some undesirable behavior, especially for OplogBufferCollection.
Consider this below case,
1) A service/application uses a temp collection as an oplog buffer,
2) oplog buffer shutdown gets called which leads to dropping of temp collection.
3) Now, oplog fetcher tries to insert some documents into the buffer collection via write_ops_exec::performInserts(). To be noted, performInserts() will create the collection if the collection is missing before inserting documents. so, now a new non-temporary collection gets created as performInserts() has no access to oplog buffer options

Second minor consequence, it can unnecessarily make oplog applier to wait for data.

P.S: The case that I mentioned here is not possible in the current code implementation. The ticket is to lay out the safety rules for oplog buffer.


Generated at Thu Feb 08 05:29:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.