[SERVER-46229] setting multikey on index fails if index was created within same multi-document transaction Created: 18/Feb/20  Updated: 29/Oct/23  Resolved: 25/Feb/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.4

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

Issue Links:
Depends
Related
related to SERVER-48010 Substitute ghost timestamp with no-op... Closed
is related to SERVER-41766 Secondary may encounter prepare confl... Closed
is related to SERVER-44849 Allow createIndexes inside multi-docu... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-02-24, Execution Team 2020-03-09
Participants:
Linked BF Score: 10

 Description   

In a multi-document transaction where an index is created (see SERVER-44849), if a subsequent insert within the same transaction has a mutikey field that would convert the recently created index into a multikey index, the function IndexCatalogEntryImpl::setMultikey() would fail within this side transaction introduced in SERVER-41766.

One possible cause is that the index created in the parent transaction is not visible to the side transaction.



 Comments   
Comment by Githook User [ 25/Feb/20 ]

Author:

{'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}

Message: SERVER-46229 extend test coverage in create_indexes.js and create_indexes_parallel.js to include multikey
Branch: master
https://github.com/mongodb/mongo/commit/383d7183532929620cf31d7f89a0a37daaea8b8e

Comment by Githook User [ 22/Feb/20 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-46229 add IndexCatalogEntryImpl::_setMultikeyInMultiDocumentTransaction()
Branch: master
https://github.com/mongodb/mongo/commit/68dfffe822f1888f221b265dc7974e9f98ea383c

Comment by Githook User [ 22/Feb/20 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-46229 add IndexCatalogEntryImpl::_catalogSetMultikey()
Branch: master
https://github.com/mongodb/mongo/commit/0839064b93c75ee7a273dba296a286f521080da5

Comment by Githook User [ 22/Feb/20 ]

Author:

{'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}

Message: SERVER-46229 add mutlikey index to multi-document transaction test for index creation
Branch: master
https://github.com/mongodb/mongo/commit/9b7b179d83d4515f87e425c32a33b3a78f087278

Comment by Githook User [ 22/Feb/20 ]

Author:

{'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}

Message: SERVER-46229 avoid using side transaction to set multikey flag if the index was created in the same multi-document transaction
Branch: master
https://github.com/mongodb/mongo/commit/864fbf14ed92ce263c4481b960285fce6f407fb6

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