[SERVER-50287] drop_index.js fails when run in passthrough suite with stepdown Created: 13/Aug/20  Updated: 29/Oct/23  Resolved: 03/Jul/21

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

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

Issue Links:
Backports
Depends
Related
is related to SERVER-37727 Enhance dropIndexes to accept multipl... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Execution Team 2021-07-12
Participants:
Linked BF Score: 20

 Description   

When the jsCore test drop_index.js is run in a replica set passthrough configuration, a stepdown occurring after dropping multiple indexes may result in the subsequent listIndexes command returning one of the dropped indexes. This could be caused by the listIndexes connected to a new primary that may not replicated the oplog entries for both dropped indexes (c_1 and d_1).

According to SERVER-37727, a successful dropIndexes command from the client for multiple indexes results in replicating one dropIndexes oplog entry per index dropped.



 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 [ 21/Jul/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-50287 drop_index.js fails when run in passthrough suite with stepdown

(cherry picked from commit d8170c86a9b14687ca93df4e18241f05d058f780)
Branch: v5.0
https://github.com/mongodb/mongo/commit/99014557d44ce94c173747d9d21d1016ffb8bc6a

Comment by Githook User [ 20/Jul/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-50287 drop_index.js fails when run in passthrough suite with stepdown

(cherry picked from commit d8170c86a9b14687ca93df4e18241f05d058f780)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0b73de2892501d3569f13bb7e375e29f902884a7

Comment by Githook User [ 02/Jul/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-50287 drop_index.js fails when run in passthrough suite with stepdown
Branch: master
https://github.com/mongodb/mongo/commit/d8170c86a9b14687ca93df4e18241f05d058f780

Comment by Benety Goh [ 20/Oct/20 ]

We have a preference for option 3.

Comment by Max Hirschhorn [ 13/Aug/20 ]

Here are what I see as the options:

  1. Change the dropIndexes command to replicate atomically. Our stepdown suites rely on an IndexNotFound error response to mean the index has already been dropped. (It is uncommon for a test to drop a never existing index.) The fact that the dropIndexes command sometimes replicates atomically as an abortIndexBuild oplog entry and sometimes replicates non-atomically as a series of dropIndexes oplog entries is somewhat unusual.
  2. Change the dropIndexes command with multiple indexes to be issued as a series of dropIndexes command each with a single index when running in our stepdown suites. It is likely too fancy to only unroll the dropIndexes command on a network error (although that's probably what an ordinary user would end up doing).
  3. Accept the dropIndexes command with multiple indexes as not being retryable. A "Refusing to run a test" case should be added to network_error_and_txn_override.js. The dropIndexes command with a single index must still be considered retryable.
Comment by Benety Goh [ 13/Aug/20 ]

It's possible that we cannot retry this dropIndexes command. The object of this test case is to provide multiple index names in a single invocation. Unrolling the dropIndexes command seems counter to the what SERVER-37727 is trying to do.

Comment by Max Hirschhorn [ 13/Aug/20 ]

benety.goh, I'd expect network_error_and_txn_override.js to be causing the replica_sets_multi_stmt_txn_stepdown_jscore_passthrough.yml test suite to be running the dropIndexes command with w=majority. Is the problem that dropIndexes with multiple indexes cannot be retried because it is possible IndexNotFound would be returned immediately without dropping the other indexes mentioned in the command? I think our stepdown suites are going to want to unroll a dropIndexes with multiple indexes into multiple dropIndexes command with a single index so they can be meaningfully retried then.

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