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

Fix wiredtiger session cache invariant during DISTINCT_SCAN execution

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2024-11-11, QO 2024-11-25
    • 200

      When executing the plan below, we hit this invariant. The bug seems to involve a combination of fetching, shard filtering and orphans.

      {
      	"isCached" : false,
      	"stage" : "SORT_KEY_GENERATOR",
      	"inputStage" : {
      		"stage" : "DISTINCT_SCAN",
      		"keyPattern" : {
      			"shardKey" : 1,
      			"notShardKey" : 1
      		},
      		"indexName" : "shardKey_1_notShardKey_1",
      		"isMultiKey" : false,
      		"multiKeyPaths" : {
      			"shardKey" : [ ],
      			"notShardKey" : [ ]
      		},
      		"isUnique" : false,
      		"isSparse" : false,
      		"isPartial" : false,
      		"isShardFiltering" : true,
      		"isFetching" : true,
      		"indexVersion" : 2,
      		"direction" : "forward",
      		"indexBounds" : {
      			"shardKey" : [
      				"(\"chunk1_s0\", {})"
      			],
      			"notShardKey" : [
      				"[MinKey, MaxKey]"
      			]
      		}
      	}
      }
      

       

            Assignee:
            alya.berciu@mongodb.com Alya Berciu
            Reporter:
            henri.nikku@mongodb.com Henri Nikku
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: