-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
I have an integration test I'm writing for a third-party library `langchain-ai` and the integration test involves creating, updating, and dropping vector search indexes. When several drop index operations are called from one integration test to another, I oftentimes get an `OperationFailure` with failure code 20: ILLEGAL OPERATION detailing the server has already received a request to drop the specified index.
ongo.errors.OperationFailure: Index already requested to be deleted, full error: {'ok': 0.0, 'errmsg': 'Index already requested to be deleted', 'code': 20, 'codeName': 'IllegalOperation', '$clusterTime': {'clusterTime': Timestamp(1710987671, 1), 'signature': {'hash': b'\x04N\x88\xcc7\x05x@\x10xj\xa2\xe7\x15,\xe2\xc7\x16\x04\xfb', 'keyId': 7292037883655880706}}, 'operationTime': Timestamp(1710987671, 1)}
For situations like this, could we either:
- Have the server silently ignore redundant requests to drop the index.
- Have the server have a more specific failure code as the ILLEGAL OPERATION code seems vague. Having a new code more representative of `duplicate request` feels semantically easier to engage with.