[SERVER-82349] Mongo 7 crashes on applyOps index delete/drops without a collection UUID Created: 20/Oct/23  Updated: 02/Feb/24

Status: In Progress
Project: Core Server
Component/s: None
Affects Version/s: 7.0.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Aleksandr Nechaev Assignee: Gavin Peters
Resolution: Unresolved Votes: 0
Labels: applyOps, storex-shortlist
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File backtrace.json    
Issue Links:
Related
is related to SERVER-36951 applyOps should work with a createInd... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Steps To Reproduce:

See the description.

Sprint: Execution Team 2024-01-08, Execution Team 2024-01-22, Execution Team 2024-02-05, Execution Team 2024-02-19
Participants:

 Description   

Steps to reproduce:

1. Run Mongo 7+ and connect to it

docker run -d -p 27017:27017 --name mongo7-test mongo:7.0.2 --replSet mongo-test-rs 

2. Create an index and try dropping it via applyOps: dropIndexes, but omitting the ui field:

use test
 
rs.initiate()
 
db.testColl.createIndex({a: 1})
 
db.runCommand({applyOps: [{ op: 'c', ns: 'test.$cmd', o: { dropIndexes: 'testColl', index: 'a_1' }, o2: { v: 2, key: { a: 1 }, name: 'a_1' }}]}) 

Actual behavior:
Connection is closed (EOF).
On a server side, there is a fatal message in the log that a thread is terminated without an exception (backtrace is attached).

Expected behavior:

I'm not sure whether it should be able drop the index without specifying UUID (other commands work this way, e.g. see https://jira.mongodb.org/browse/SERVER-36951), but in Mongo 4.4-6.0 this runCommand has no effect: it completes successfully, but no indexes are dropped.

For Mongo 7+, this runCommand should not cause a crash as well.

 


Generated at Thu Feb 08 06:48:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.