[SERVER-30256] Expand testing for initial sync in capped collections Created: 21/Jul/17  Updated: 06/Dec/22  Resolved: 10/Apr/18

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

Type: Improvement Priority: Major - P3
Reporter: Jason Chan Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-8972 extent layout differences can cause i... Closed
is related to SERVER-16049 Replicate capped collection deletes e... Closed
is related to SERVER-66775 Enhance consistency checking for capp... Backlog
is related to SERVER-25376 Add a hook to check that oplogs in a ... Closed
Assigned Teams:
Replication
Participants:

 Description   

Currently, capped collections are tested with initial sync with our jstest passthrough tests. However, these tests do not check the equality between a source capped collection and a target capped collection after the cloning process. Ideally, we want to expand the testing to check that initial sync on capped collections produces the expected behavior of having the target collection being an exact replica of the source collection.



 Comments   
Comment by Spencer Brody (Inactive) [ 25/Jul/17 ]

Such a test may be difficult/impossible to make stable until/unless SERVER-16049 gets implemented. Since each replica set member decides when to delete old entries from a capped collection independently, differences in the data layout on disk can result in the nodes having deleting old documents at different times. This is a known issue with capped collections in replica sets that has been around since the beginning of capped collections and replica sets.

Given that, I'm not sure it makes sense to invest any time into making a test for this behavior since any such test is likely to be inherently flaky.

Comment by Judah Schvimer [ 21/Jul/17 ]

Rather than do a dbhash check, we can simply walk through the collection like ReplSetTest.prototype.checkOplogs() to check for equality.

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