The following shell sharding helpers use a write concern of w:majority, but do not specify a wtimeout:
- sh.setBalancerState
- sh.disableBalancing
- sh.enableBalancing
- sh.addShardTag
- sh.removeShardTag
- sh.addTagRange
- sh.removeTagRange
This means that users get no feedback if the operations are slow to propagate to a majority of config servers.
Simply adding a wtimeout (eg. 30 or 60s) causes the shell helpers to apparently fail if they take too long. In addition to potentially confusing users, this causes spurious jstest failures.
The shell helpers should specify a reasonably low wtimeout (eg. 10s), and then if the operation has timed out due to wtimeout, the shell helper should react accordingly, ie. output a message to notify the user what has happened, and commence polling to determine when the write has gone through to a majority (eg. call GLE, if possible, or do appropriate readConcern majority reads).
- is related to
-
SERVER-25478 Use wtimeout in sh.setBalancerState
- Closed
-
SERVER-20818 Add wtimeouts to writeConcerns in sharding suite tests
- Closed
- related to
-
SERVER-22449 Check for write errors when changing balancer state in shell helpers
- Closed
-
SERVER-25019 Shell helpers should give users feedback during periods of long waits
- Closed
-
SERVER-23145 Shell sharding helpers should give feedback on success
- Closed