[SERVER-25966] Add initial sync unittests for metadata retries Created: 06/Sep/16 Updated: 05/Apr/17 Resolved: 29/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Sprint: | Repl 2016-10-10, TIG 2016-11-21, Repl 2016-12-12, Repl 2017-02-13 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Write tests that send failed responses and then successful responses for the following commands, checking that retries lead to a successful result:
Write tests for the OplogFetcher to ensure it retries and does not cause initial sync to fail on retryable errors Write tests for the DataReplicator to test that larger errors lead to a restart of initial sync:
|
| Comments |
| Comment by Githook User [ 29/Dec/16 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Benety Goh [ 27/Dec/16 ] |
|
See this commit for the metadata retry changes: https://github.com/mongodb/mongo/commit/eba32f352cffd1dbe8ca451bde5944b997bfebf5 |
| Comment by Judah Schvimer [ 22/Nov/16 ] |
|
I think that sync source change testing can be done in unittests. We will revisit this after |
| Comment by Robert Guo (Inactive) [ 22/Nov/16 ] |
|
judah.schvimer Giving this back to you for another look. I think this ticket can be closed given that we have testing of most things in the description (see my comment above for detail). The only thing missing is sync source change causing initial sync to restart, which I believe can be more easily tested from JavaScript, possibly using the replSetSyncFrom command. |
| Comment by Robert Guo (Inactive) [ 16/Nov/16 ] |
|
I was able to find existing unit tests for almost all of these scenarios.
Retries are handled internally by RemoteCommandRetryScheduler, so there's no need to do additional testing of successful retries of individual commands. Failure after exhausting retries should be handled the same way by be bubbling up the failure to the caller of doInitialSync. I did a sanity check by failing each of the above commands (logs are attached to this ticket). In all cases, the failures correctly trigger an fassert on the initial sync node as expected without side-effects. sync source selection has different logic to the other commands and could benefit from additional testing. |