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

Merging chunks must not set `validAfter` to the current wall time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.0.4, 6.3.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.2, v6.1, v6.0, v5.0
    • Sharding EMEA 2022-11-28, Sharding EMEA 2022-12-12

    Description

      When two or more contiguous chunks belonging to the same shards are being merged, the shard is sending to the config server a validAfter field set to the current time.

      This is wrong because merging is not implying any ownership change.

      Setting an unnecessary value for validAfter has the side effect of potentially breaking snapshot reads.

      Example assuming history window of 300 seconds:

      • Contiguous chunks A-B-C have never been migrated, so their history is empty
      • A merge is called for such chunks at time 100
      • The new chunk will have validAfter: 100
      • A snapshot read arrives at time 99: it can't be served because the pre-100 history is missing, even if it was empty.

      Purpose of this ticket is to set the validAfter field to the higher validAfter belonging to one of the chunks to merge or - in case of empty history on all of them - not setting it.

      Attachments

        Activity

          People

            silvia.surroca@mongodb.com Silvia Surroca
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: