[SERVER-29867] moveChunk command ignores "_waitForDelete:" option Created: 26/Jun/17  Updated: 30/Oct/23  Resolved: 29/Aug/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.9
Fix Version/s: 3.4.7

Type: Bug Priority: Major - P3
Reporter: Nathan Myers Assignee: Esha Maharishi (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Sprint: Sharding 2017-07-31
Participants:
Linked BF Score: 0

 Description   

The moveChunk command offers a "waitForDelete" option that does the obvious. It ignores "_waitForDelete" spelled without the leading underscore.

It should treat both spellings identically. The documentation should be changed to suggest the non-underscore version. (We will support the underscore spelling indefinitely, for backward compatibility.)

Drivers should also accept the non-underscore option, and corresponding IDE annotations should suggest it.



 Comments   
Comment by Esha Maharishi (Inactive) [ 21/Jul/17 ]

Author:

{u'username': u'EshaMaharishi', u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-29876 moveChunk command ignores '_waitForDelete' option
Branch: v3.4
https://github.com/mongodb/mongo/commit/aeccd2c8b429f4f3f81f5fb8e048ddb58fd0749a

Comment by Nathan Myers [ 21/Jul/17 ]

Probably. But _waitForDelete makes less difference in
3.4 because there is no orphanCleanupDelaySecs.
We should backport it anyway because people spelling
it wrong probably either don't notice, or notice and curse
us while they fix it, and neither outcome is good.

Comment by Kaloian Manassiev [ 21/Jul/17 ]

Is this a problem in 3.4 as well?

Comment by Esha Maharishi (Inactive) [ 20/Jul/17 ]

SERVER-30133 includes this fix, and makes mongos, config servers, and shards accept either 'waitForDelete' or '_waitForDelete'.

Comment by Esha Maharishi (Inactive) [ 10/Jul/17 ]

Also noting that mongos only passes '_waitForDelete' (with underscore) to the config server: https://github.com/mongodb/mongo/blob/r3.5.9/src/mongo/s/commands/cluster_move_chunk_cmd.cpp#L199

Comment by Esha Maharishi (Inactive) [ 07/Jul/17 ]

nathan.myers, I think this might be backwards - shards respect "waitForDelete" but not "_waitForDelete"?

https://github.com/mongodb/mongo/blob/1b49f7f0e3d72662ddf81d7c3ed5254d874a0673/src/mongo/s/move_chunk_request.cpp#L47

Comment by Nathan Myers [ 26/Jun/17 ]

The moveChunk command will now interpret a "waitForDelete:" option identically as "_waitForDelete", instead of ignoring it.

Note that, starting in 3.6, if the waitForDelete option is not chosen, the command returns immediately after the chunk is copied, but the server waits before beginning to delete the orphan chunk. The waiting period is determined by the orphanCleanupDelaySecs server parameter, which defaults to 15 minutes. (This delay is intended to allow queries still running on secondary servers, which may depend on documents in the chunk, to complete before deletion begins.)

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