[SERVER-31892] moveChunk with `waitForDelete` doesn't wait for majority write concern Created: 09/Nov/17  Updated: 30/Oct/23  Resolved: 18/Sep/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.9, 4.0.4, 4.1.4

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
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:
v4.0, v3.6
Sprint: Sharding 2018-09-24
Participants:
Linked BF Score: 30

 Description   

This leads to the problem described in detail in BF-6920.

I propose simply adding a waitForWriteConcern to moveChunk before the scoped registered migration object goes out of scope.



 Comments   
Comment by Githook User [ 08/Oct/18 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-31892 moveChunk with should wait for majority write concern

(cherry picked from commit 07ecc05d44c2a4f443bccf96004a1da16b2e3984)
Branch: v3.6
https://github.com/mongodb/mongo/commit/05641d1216ffe2b0b0612863b5380d608eb74532

Comment by Githook User [ 08/Oct/18 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-31892 moveChunk with should wait for majority write concern

(cherry picked from commit 07ecc05d44c2a4f443bccf96004a1da16b2e3984)
Branch: v4.0
https://github.com/mongodb/mongo/commit/d6e59053689e3822c666046ce96cf68451688230

Comment by Githook User [ 18/Sep/18 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-31892 moveChunk with should wait for majority write concern
Branch: master
https://github.com/mongodb/mongo/commit/07ecc05d44c2a4f443bccf96004a1da16b2e3984

Comment by Kaloian Manassiev [ 09/Nov/17 ]

I guess this is a reasonable solution, given that waitForDelete is mostly used for testing. I still like having the range deleter taking checkpoints from time to time in order to not interfere with the ongoing load and also as a sanity-checking.

Comment by Dianna Hohensee (Inactive) [ 09/Nov/17 ]

We could place the waitForWriteConcern inside the waitForDelete check – would this resolve such issues?

Comment by Kaloian Manassiev [ 09/Nov/17 ]

I don't think we should force moveChunk to always perform a majority write concern. We have had customers complain about this impacting the rate of migration out of overloaded shards.

Instead, we should make the range deleter wait for a majority write concern when it finishes a range to be deleted here.

Ideally, this wait should only happen if this is an outgoing migration, but not when the range deleter is used to clean space for incoming migration.

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