[SERVER-39596] While a node is not in primary/secondary state, dbStats/collStats should not hang Created: 15/Feb/19 Updated: 06/May/20 Resolved: 06/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Linda Qin | Assignee: | Gregory Wlodarek |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.2, v4.0, v3.6
|
||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2019-12-16, Execution Team 2020-02-10, Execution Team 2019-12-30, Execution Team 2020-05-18 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||
| Linked BF Score: | 47 | ||||||||||||||||||||||||||||||||
| Description |
|
Currently when a node is in initial sync (STARTUP2), running a query on a collection (except collections in local database) returns error "NotMasterOrSecondary":
However, when we run the dbStats or collStats commands (on the collection that is syncing), the commands will just hang there, waiting for locks. Since the node is in STARTUP2 state (not ready for reads), will we consider just returning an error "NotMasterOrSecondary" for dbStats/collStats/listDatabases/etc commands (same as the {find}} command)? |
| Comments |
| Comment by Gregory Wlodarek [ 06/May/20 ] |
|
I'm closing this ticket as a duplicate of I'm going to request that we consider backporting |
| Comment by Githook User [ 28/Jan/20 ] |
|
Author: {'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek', 'name': 'Gregory Wlodarek'}Message: Revert " This reverts commit 0e079cef6ba967a3cc930c6fb7960a9125a387ad. delete mode 100644 jstests/replsets/initial_sync_does_not_block_commands.js |
| Comment by Githook User [ 28/Jan/20 ] |
|
Author: {'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek', 'username': 'GWlodarek'}Message: Revert " This reverts commit 8f3a768c61a9ca3c46739c5639584e738774666b. |
| Comment by Githook User [ 26/Dec/19 ] |
|
Author: {'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}Message: |
| Comment by Githook User [ 20/Dec/19 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |
| Comment by Gregory Wlodarek [ 20/Dec/19 ] |
|
We've managed to make these commands not hang instead of disallowing them to run on secondaries during the initial sync phase. There was an internal locking issue which continued to hold onto an exclusive collection lock throughout the entire collection cloning phase. |