[SERVER-44758] mongo configdb local.oplog.rs without chunk split operation Created: 21/Nov/19  Updated: 06/Dec/22  Resolved: 13/Dec/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.8
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: qingsong chen Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Triage
Participants:

 Description   

mongo shard config server, when a shard call a rpc ConfigSvrSplitChunkCommand, the config primary server do this, other config secondary servers not do. the primary server does insert config.chunks collection, and insert config.changelog, insert oplog with changelog inserted, but not insert oplog with chunks. In fact, the config secondary servers has the newest chunks document.

chunk split code follows: 

configsvr_split_chunk_command.cpp:ConfigSvrSplitChunkCommand

// code placeholder
    // apply the batch of updates to local metadata    Status applyOpsStatus = Grid::get(opCtx)->catalogClient()->applyChunkOpsDeprecated(        opCtx,        updates,        preCond,        ns.ns(),        mergeVersion,        WriteConcernOptions(),        repl::ReadConcernLevel::kLocalReadConcern);    if (!applyOpsStatus.isOK()) {        return applyOpsStatus;    }
    // log changes    BSONObjBuilder logDetail;    {        BSONArrayBuilder b(logDetail.subarrayStart("merged"));        for (auto chunkToMerge : chunksToMerge) {            b.append(chunkToMerge.toConfigBSON());        }    }    collVersion.addToBSON(logDetail, "prevShardVersion");    mergeVersion.addToBSON(logDetail, "mergedVersion");
    Grid::get(opCtx)        ->catalogClient()        ->logChange(opCtx, "merge", ns.ns(), logDetail.obj(), WriteConcernOptions())        .transitional_ignore();
    return applyOpsStatus;

my problem, when chunk split, the config secondary chunks how to be added, where is the code called. please help, thank you.

 



 Comments   
Comment by Kelsey Schubert [ 13/Dec/19 ]

In addition, the mongodb-dev group is a good resource for code-related discussion.

Comment by Eric Sedor [ 27/Nov/19 ]

Hi chenqingsong111@126.com,

For assistance understanding how MongoDB functions, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag.

The SERVER project is for bugs and feature suggestions for the MongoDB server; we'd be happy to look into an issue if you suspect a bug.

Does this make sense?

Eric

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