TLDR: MODE_X collection access in IndexBuildsCoordinator::_filterSpecsAndRegisterBuild() is not compatible with second test case; and fix log message detection in test.
create_new_indexes_with_conflict.js runs two test cases using the same test function runConflictingCollectionCreate(). During the second test run, the test function may erroneously detect the log message from the first test run.
This issue may be resolved by using checkLog.containsWithCount() rather than checkLog.contains(); or by splitting up the test into two separate JS files. However, fixing the test itself exposes an issue with the second test case which runs an index build on an existing collection - the second test case will hang due to an exclusive lock in IndexBuildsCoordinator::_filterSpecsAndRegisterBuild() that conflicts with the fail point in create_indexes.cpp.
- is related to
-
SERVER-44405 Use MODE_IX lock for implicit collection creation with createIndexes
- Closed
- related to
-
SERVER-49837 add test for createIndexes command to check if all indexes already exist under an intent lock
- Closed