[SERVER-41688] hashindex1.js should explicitly create collection before trying to create an invalid index Created: 13/Jun/19  Updated: 29/Oct/23  Resolved: 14/Jun/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.0-rc3, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Samyukta Lanka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Repl 2019-06-17, Repl 2019-07-01
Participants:
Linked BF Score: 14

 Description   

We implicitly create a collection (and its _id index) while trying to create an invalid index. We expect the collection creation and _id index creation to succeed, but not the other index creation. This can cause issues in passthrough suites that use network_error_and_txn_override.js because we attach write concern majority to all writes. If the write concern fails, we don't retry the command because the command also fails with the expected error that the index couldn't be created. As a result, if the test steps up a node that did not receive the command to create the index, it will not have created the collection, so this check for the number of indexes on the collection fails.



 Comments   
Comment by Githook User [ 01/Jul/19 ]

Author:

{'name': 'Samy Lanka', 'username': 'lankas', 'email': 'samy.lanka@mongodb.com'}

Message: SERVER-41688 hashindex1.js should explicitly create collection before trying to create an invalid index

(cherry picked from commit 82dd1226e19fdb6a8fe0c2c2024e65b18b1c336e)
Branch: v4.2
https://github.com/mongodb/mongo/commit/c9df018bd1282a88e75172c4fae7e0091d1a1279

Comment by Githook User [ 14/Jun/19 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}

Message: SERVER-41688 hashindex1.js should explicitly create collection before trying to create an invalid index
Branch: master
https://github.com/mongodb/mongo/commit/82dd1226e19fdb6a8fe0c2c2024e65b18b1c336e

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