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

Log moveChunk counts in changelog

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Sharding
    • Fully Compatible

      Currently the counts of migrated documents are only recorded in the mongod logs, and not in config.changelog:

      2017-06-12T19:05:49.897+0000 I SHARDING [conn1028707] moveChunk data transfer progress: { active: true, sessionId: "...", ns: "...", from: ".../...:27018,...:27018,...:27018", min: { ... }, max: { ... }, shardKeyPattern: { ... }, state: "steady", counts: { cloned: 53195, clonedBytes: 68335232, catchup: 0, steady: 0 }, ok: 1.0 } mem used: 0 documents remaining to clone: 0
      2017-06-12T19:05:49.955+0000 I SHARDING [conn1028707] Migration successfully entered critical section
      2017-06-12T19:05:49.965+0000 I SHARDING [conn1028707] Refreshing chunks for collection ... based on version ...|...||...
      2017-06-12T19:05:49.982+0000 I SHARDING [CatalogCacheLoader-4626] Refresh for collection ... took 17 ms and found version ...|...||...
      2017-06-12T19:05:49.992+0000 I SHARDING [conn1028707] Refreshing metadata for collection ... from collection version: ...|...||..., shard version: ...|...||... to collection version: ...|...||..., shard version: ...|...||...
      2017-06-12T19:05:49.992+0000 I SHARDING [conn1028707] Migration succeeded and updated collection version to ...|...||...
      2017-06-12T19:05:49.992+0000 I SHARDING [conn1028707] about to log metadata event into changelog: { _id: "...", server: "...", clientAddr: "...", time: new Date(...), what: "moveChunk.commit", ns: "...", details: { min: { ... }, max: { ... }, from: "...", to: "..." } }
      

      It would be useful if the final counts could also be saved in the moveChunk.commit changelog document, ie:

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
       {
               "_id" : "...",
               "server" : "...",
               "clientAddr" : "...",
               "time" : ISODate(...),
               "what" : "moveChunk.commit",
               "ns" : "...",
               "details" : {
                       "min" : {
                               ...
                       },
                       "max" : {
                               ...
                       },
                       "from" : "...",
                       "to" : "...",
      +                "counts" : {
      +                        "cloned" : 53195,
      +                        "clonedBytes" : 68335232,
      +                        "catchup" : 0,
      +                        "steady" : 0
      +                }
               }
       }
      

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: