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

[SBE][sharding] invariant failure: no 'tsSlot' during resharding_oplog_sync_agg_*.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: Querying, Sharding
    • None
    • Fully Compatible
    • Query Execution 2021-04-19, Query Execution 2021-05-03

      During resharding_oplog_sync_agg_assert_min_oplog.js:

      [js_test:resharding_oplog_sync_agg_assert_min_oplog] [jsTest] ----
      [js_test:resharding_oplog_sync_agg_assert_min_oplog] [jsTest] Run aggregation pipeline on oplog with $_requestReshardingResumeToken set
      [js_test:resharding_oplog_sync_agg_assert_min_oplog] [jsTest] ----
      [js_test:resharding_oplog_sync_agg_assert_min_oplog] 
      [js_test:resharding_oplog_sync_agg_assert_min_oplog] d20770| 2021-04-06T19:17:58.193+00:00 F  -        23079   [conn1] "Invariant failure","attr":{"expr":"tsSlot","file":"src/mongo/db/query/sbe_stage_builder_coll_scan.cpp","line":212}
      [js_test:resharding_oplog_sync_agg_assert_min_oplog] d20770| 2021-04-06T19:17:58.193+00:00 F  -        23080   [conn1] "\n\n***aborting after invariant() failure\n\n"
      [js_test:resharding_oplog_sync_agg_assert_min_oplog] d20770| 2021-04-06T19:17:58.193+00:00 F  CONTROL  4757800 [conn1] "Writing fatal message","attr":{"message":"Got signal: 6 (Aborted).\n"}
      

      The site of the invariant failure is in generateOptimizedOplogScan() :

              // We will be constructing a filter that needs to see the 'ts' field. We name it 'minTsSlot'
              // here so that it does not shadow the 'tsSlot' which we allocated earlier.
              auto&& [fields, minTsSlots, minTsSlot] = makeOplogTimestampSlotsIfNeeded(
                  collection, slotIdGenerator, csn->shouldTrackLatestOplogTimestamp);
      
              // We should always have allocated a 'minTsSlot', and there should always be a 'tsSlot'
              // already allocated for the existing scan that we created previously.
              invariant(minTsSlot);
              invariant(tsSlot);  // <------ fails
      

      Affected tests:

      • resharding_oplog_sync_agg_assert_min_oplog.js
      • resharding_oplog_sync_agg_resume_token.js

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: