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

[test-only bug] CheckRoutingTableConsistency may be executing while sessions collection is being sharded

    • Sharding EMEA
    • Fully Compatible
    • ALL
    • Sharding EMEA 2023-06-26, Sharding EMEA 2023-07-10, Sharding EMEA 2023-08-21, Sharding EMEA 2023-09-04
    • 5
    • 2

      The CheckRoutingTableConsistency hook can sporadically fail when it is executed exactly while the sessions collection is being sharded.

      The logicalSessionRefreshMillis parameter (defaulted to 5 minutes) is driving the logical session cache refresh that - when no sessions have been used during testing - basically spawns the creation+sharding of the sessions collection.

      Since the refresh is asynchronous, it can totally happen for it to overlap with the execution of teardown hooks.

      The failing flow is the following, happening more or less 5 minutes after the sharded cluster has been spawned for testing:

      1. [logical session refresh] Create chunk entry for the sessions collection (insert in config.chunks)
      2. [test] CheckRoutingTableConsistency lurks in looking for inconsistencies (make sure there is no document in config.chunks referring a collection UUID that is not present in config.collections)
      3. [logical session refresh] Create collection entry for the sessions collection (insert in config.collections)

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: