[SERVER-60386] SBE invariant failure with clustered collections Created: 01/Oct/21  Updated: 29/Oct/23  Resolved: 04/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Josef Ahmad Assignee: Haley Connelly
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongod.log    
Issue Links:
Depends
is depended on by SERVER-60071 Move clustered index jstests out of t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

MongoDB Enterprise > db.createCollection('clustered_collection', {clusteredIndex: {key: {_id: 1}, unique: true}})
{ "ok" : 1 }
MongoDB Enterprise > db.clustered_collection.find({_id: 'x'})
Error: error doing query: failed: network error while attempting to run command 'find' on host '127.0.0.1:27017'

Sprint: Execution Team 2021-10-18
Participants:

 Description   

Spotted on r5.1.0-alpha-1234-gfe4cf6134b . Is it due to the reenabling of SBE as the default query engine in SERVER-59178?

 
{"t":\{"$date":"2021-10-01T14:34:46.408+00:00"},"s":"F", "c":"ASSERT", "id":23079, "ctx":"conn1","msg":"Invariant failure","attr":\{"expr":"collection->ns().isOplog()","file":"src/mongo/db/query/sbe_stage_builder_coll_scan.cpp","line":250}}



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 01/Oct/21 ]

Author:

{'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}

Message: SERVER-60386 [SBE] Use classic engine for clustered collections
Branch: master
https://github.com/mongodb/mongo/commit/b8b8e0f26453fbcc239a6fef92ab32f6545870cd

Comment by Haley Connelly [ 01/Oct/21 ]

Thanks for filing the ticket josef.ahmad!

I brought this up with sbe folks offline.

My understanding is the fix should be to modify the isQuerySbeCompatible method to check whether it is a clustered collection (not just time-series).

Comment by Josef Ahmad [ 01/Oct/21 ]

When turning off SBE via --setParameter internalQueryForceClassicEngine=1 the issue doesn't reproduce.

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