[SERVER-35366] Oplog applier batch size should never be less than 16MB Created: 01/Jun/18  Updated: 29/Oct/23  Resolved: 05/Jun/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.0.0, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Judah Schvimer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Repl 2018-06-18
Participants:
Linked BF Score: 71

 Description   

Here is where we calculate the batch size.



 Comments   
Comment by Githook User [ 05/Jun/18 ]

Author:

{'username': 'judahschvimer', 'name': 'Judah Schvimer', 'email': 'judah@mongodb.com'}

Message: SERVER-35366 OplogApplier only returns empty batch when buffer is empty

(cherry picked from commit 9d000b9eced82065afaa4a64c227930da0d70206)
Branch: v4.0
https://github.com/mongodb/mongo/commit/7d279ea159a8f781123f5a60012d4209cc97e41e

Comment by Githook User [ 05/Jun/18 ]

Author:

{'username': 'judahschvimer', 'name': 'Judah Schvimer', 'email': 'judah@mongodb.com'}

Message: SERVER-35366 OplogApplier only returns empty batch when buffer is empty
Branch: master
https://github.com/mongodb/mongo/commit/9d000b9eced82065afaa4a64c227930da0d70206

Comment by Spencer Brody (Inactive) [ 01/Jun/18 ]

Another approach would be to keep the batch size limit calculation the same, but ensure that every batch always has at least 1 op. I don't think we care very much about the use case of nodes with oplogs smaller than 160MB, however, so the simpler fix of just making sure the batch size limit is always at least 16MB seems like a fine approach.

Comment by Judah Schvimer [ 01/Jun/18 ]

The batch size is checked in the oplog applier here. It's not set on the cursor.

Generated at Thu Feb 08 04:39:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.