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

Avoid useless initial iteration in ChunkMap chunks loops

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0, 7.1.0-rc2
    • 7.1.0-rc0
    • None
    • None
    • Fully Compatible
    • v7.1
    • Sharding EMEA 2023-09-04, Sharding EMEA 2023-09-18

    Description

      Here and here we use lower_bound instead of upper_bound to find the vector that contain the first chunk of the loop. The consequence is that when the start shard key is equal to the minKey of the first chunk of a vector, we will wrongly start iterating from the previous vector instead of the correct one.

      This does not actually cause any correctness issue because in both cases the logic afterward will simply skip the initial wrong vector because it doesn't actually contain the initial shard Key.
      In any case, this logic is wrong and should be fixed.

      Attachments

        Activity

          People

            tommaso.tocci@mongodb.com Tommaso Tocci
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: