[SERVER-24335] Shell sharding helpers should use wtimeout and respond appropriately Created: 01/Jun/16  Updated: 25/Jan/17  Resolved: 12/Jul/16

Status: Closed
Project: Core Server
Component/s: Sharding, Shell
Affects Version/s: None
Fix Version/s: 3.2.9, 3.3.10

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-22449 Check for write errors when changing ... Closed
related to SERVER-25019 Shell helpers should give users feedb... Closed
related to SERVER-23145 Shell sharding helpers should give fe... Closed
is related to SERVER-25478 Use wtimeout in sh.setBalancerState Closed
is related to SERVER-20818 Add wtimeouts to writeConcerns in sha... Closed
Backwards Compatibility: Minor Change
Backport Completed:
Sprint: Sharding 16 (06/24/16), Sharding 17 (07/15/16)
Participants:

 Description   

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).



 Comments   
Comment by Githook User [ 13/Jul/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24335 Make shell sharding helpers use wtimeout in their write concerns

(cherry picked from commit 1cbfebd10239e3e7501e10ae41c4757f8990bfb0)
Branch: v3.2
https://github.com/mongodb/mongo/commit/3bc32a52191922ce72ddfe98751f5620fe858e80

Comment by Githook User [ 12/Jul/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-24335 Make shell sharding helpers use wtimeout in their write concerns
Branch: master
https://github.com/mongodb/mongo/commit/1cbfebd10239e3e7501e10ae41c4757f8990bfb0

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