Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44758

mongo configdb local.oplog.rs without chunk split operation

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.8
    • Component/s: Sharding
    • Labels:
      None
    • Server Triage

      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.

       

            Assignee:
            backlog-server-triage [HELP ONLY] Backlog - Triage Team
            Reporter:
            chenqingsong111@126.com qingsong chen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: