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

The sessions migration logic during moveChunk pollutes the logs

    • Fully Compatible
    • ALL
    • v5.2, v5.0
    • Sharding 2021-12-27, Sharding 2022-01-10
    • 2

      The sessions migration logic during moveChunk logs every time it finishes draining the active sessions with retryable writes on them.

      This means that on a system, which doesn't have retryable writes for example or where the catch-up of the actual chunk data finishes slightly earlier than the sessions being drained (such as for example with multi-writes), it will log every few milliseconds a log line like this:

      {"t":{"$date":"2021-10-14T20:03:06.094+00:00"},"s":"I",  "c":"SHARDING", "id":5087101, "ctx":"sessionCatalogMigrationProducer-delete_during_migrate-rs1_delete_during_migrate-rs0_61688cdce5032e7b7eef3557","msg":"Recipient finished draining oplog entries for retryable writes and transactions from donor for the first time, before receiving _recvChunkCommit","attr":{"namespace":"test.foo","migrationSessionId":"delete_during_migrate-rs1_delete_during_migrate-rs0_61688cdce5032e7b7eef3557","fromShard":"delete_during_migrate-rs1"}}
      

      This is wasteful both from logging perspective and from the fact that it actively polls the donor shard with useless calls.

      It would be good if some form of long-polling is implemented so that the donor is not queried actively if there are no sessions, but even if that is not implemented, at least the logging should happen only on transitions to "finished draining" rather than every time.

            Assignee:
            matt.boros@mongodb.com Matt Boros
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: