[SERVER-55888] [SBE][sharding] invariant failure: no 'tsSlot' during resharding_oplog_sync_agg_*.js Created: 07/Apr/21  Updated: 29/Oct/23  Resolved: 21/Apr/21

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kyle Suarez Assignee: Justin Seyster
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File resharding_oplog_sync_agg_resume_token.txt    
Issue Links:
Related
related to SERVER-55010 Enable sharding suite against SBE bui... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-04-19, Query Execution 2021-05-03
Participants:

 Description   

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


 Comments   
Comment by Githook User [ 21/Apr/21 ]

Author:

{'name': 'Justin Seyster', 'email': 'justin.seyster@mongodb.com', 'username': 'jseyster'}

Message: SERVER-55888 Remove unneeded condition in generateOptimizedOplogScan()
Branch: master
https://github.com/mongodb/mongo/commit/349d8eeb573eac5f9bdf7903cd83a84d037a91ae

Generated at Thu Feb 08 05:37:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.