Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-88600

Return Either a Stable error code or `ok: 1` on duplicate drop index calls.

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 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:

      1. Have the server silently ignore redundant requests to drop the index.
      2. 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jib.adegunloye@mongodb.com Jib Adegunloye
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: