117 — ConflictingOperationInProgress

concurrencyconfiguration

An incompatible operation is already running on this resource

What is happening?

ConflictingOperationInProgress is returned when an operation cannot proceed because a conflicting operation is already active on the same resource. This differs from error 40 (ConflictingUpdateOperators) which is about invalid update syntax. Error 117 specifically covers concurrent administrative or DDL operations that conflict, such as simultaneous index builds, resharding, or initial sync.

Common causes

  1. Starting an index build while another is already running on the same collection
  2. Concurrent resharding or migration operations on the same collection
  3. Running compact while another maintenance operation is in progress
  4. Initial sync already running when another is requested
  5. Concurrent collMod operations on the same collection

Diagnostic Steps

Related Issues

SERVER-138508Backlog
Change error code for multiple reshardings to reflect maximum reshardings reached
Right now, the number of concurrent resharding operations allowed is capped (SERVER-136621), and when the max is reached, we return the error code {{ConflictingOperationInProgress}} which isn't reflective of the actual error (it is a relic of invoking a second resharding operation at all while one is ongoing). We should change it to something like {{ReshardingConcurrencyLimitReached}} or {{MaximumReshardingOperationsExceeded}} to be more reflective. There is also a test plan for the multiple
SERVER-138238Backlog
Update hooks that run resharding code paths to expect concurrent reshardings
currently the only hook that starts resharding code paths is {{add_remove_shards.py}} and it is included by various suites to run as a background hook. that test hook itself expects/tolerates ReshardCollectionInProgress , and the various tests in the suites that run alongside it also tolerate ReshardCollectionInProgress and ConflictingOperationInProgress (some locally, others via shell overrides). This ticket should # relax the toleration and update the handled errors to be the capped resha
SERVER-134531Closed
timeseries_create_indexes.js FSM workload does not tolerate ConflictingOperationInProgress from createIndexes
[BF-46154|https://jira.mongodb.org/browse/BF-46154]: the [createIndex state|https://github.com/mongodb/mongo/blob/67ee0fa0fed0263185b4d2eed3fbfbe61cb763eb/jstests/concurrency/fsm_workloads/timeseries/timeseries_create_indexes.js#L123] of {{timeseries_create_indexes.js}} fails with {{createIndexes ... conflicted with another operation after 10 retries}} (code 117, ConflictingOperationInProgress) in concurrency_simultaneous suites. Since [SERVER-132822|https://jira.mongodb.org/browse/SERVER-132
SERVER-132727Closed
agg_lookup_and_move_primary.js should be resilient to conflictingOperationInProgress
The agg_lookup_and_move_primary test runs movePrimary as one of the stages. This test runs in config transition and add/remove shard suites, where movePrimary can also be issued by background hooks. When running in these suites, the test should accept conflicting operation in progress errors.