[SERVER-67296] Mark the OpCtx of the configsvr commands used to commit chunk-related DDL ops as interruptible Created: 15/Jun/22  Updated: 29/Oct/23  Resolved: 26/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.17, 5.0.11, 6.0.2, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Silvia Surroca
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0, v4.4
Sprint: Sharding EMEA 2022-07-11, Sharding EMEA 2022-07-25, Sharding EMEA 2022-08-08
Participants:
Story Points: 5

 Description   

The pattern that we have for these operations is always the same:

  1. We take the kChunks lock.
  2. We validate that the requested operation can be applied.
  3. We compute the new CollectionVersions.
  4. Finally, through a transaction (applyOps in the past, nowadays internal transactions) we modify one or more documents on config.chunks.

Let's say that a thread of the primary node of the CSRS is blocked just after step 3 and the node steps down. Another node steps up and perform some changes to the chunks that are not related to the previous operation. Finally, the old primary node steps up and commits the migration, but installing an old CollectionVersion

This problem affects the commit of the split, merge and moveChunk. I would also double check what happens for refineShardKey.

We might need to backport this fix to older versions.



 Comments   
Comment by Githook User [ 09/Aug/22 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-67296 Mark the OpCtx of the configsvr commands used to commit chunk-related DDL ops as interruptible
Branch: v5.0
https://github.com/mongodb/mongo/commit/c6e439a9ab036e9f20003623f6d95d9864349ed7

Comment by Githook User [ 30/Jun/22 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-67296 Mark the OpCtx of the configsvr commands used to commit chunk-related DDL ops as interruptible
Branch: master
https://github.com/mongodb/mongo/commit/9d1294531dc16ebd6882de48ded28edfd6c9c5ba

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