Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2944

Support CSOT spec timeoutMode for non-tailable cursors

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      The CSOT spec mentions a timeoutMode option on non-tailable cursors that makes it so that the timeout is not set cumulatively on all operations resulting from something like a Find, but instead individually on each initial operation and the follow up getMore commands: https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/client-side-operations-timeout.rst#non-tailable-cursor-behavior 

       

      Mongosync had a problem with this in HELP-47315, where it set the timeout to 5 minutes by default, which was too short for the whole Find operation (including the getMore commands) to finish. The TAR team currently has REP-3079 filed to mitigate the issue, but adhering to the CSOT spec would be preferable. The failing log in the mongod server logs is the following:

      {"t":{"$date":"2023-08-10T08:01:37.411+00:00"},"s":"W",  "c":"QUERY",    "id":20478,   "ctx":"conn7899290","msg":"getMore command executor error","attr":{"error":{"code":50,"codeName":"MaxTimeMSExpired","errmsg":"operation exceeded time limit"},"stats":{"stage":"FETCH","filter":{"$and":[{"$expr":{"$gte":["$_id",{"$const":{"$oid":"60a5a031b46b1000131feef3"}}]}},{"$expr":{"$lte":["$_id",{"$const":{"$oid":"63c70228caa93700121126f7"}}]}}]},"nReturned":15402655,"works":15402655,"advanced":15402655,"needTime":0,"needYield":0,"saveState":32929,"restoreState":32928,"isEOF":0,"docsExamined":15402655,"alreadyHasObj":0,"inputStage":{"stage":"IXSCAN","nReturned":15402655,"works":15402655,"advanced":15402655,"needTime":0,"needYield":0,"saveState":32929,"restoreState":32928,"isEOF":0,"keyPattern":{"_id":1},"indexName":"_id_","isMultiKey":false,"multiKeyPaths":{"_id":[]},"isUnique":true,"isSparse":false,"isPartial":false,"indexVersion":2,"direction":"forward","indexBounds":{"_id":["[ObjectId('60a5a031b46b1000131feef3'), ObjectId('63c70228caa93700121126f7')]"]},"keysExamined":15402655,"seeks":1,"dupsTested":0,"dupsDropped":0}},"cmd":{"getMore":7958325070821658687,"collection":"assumptions"}}} 

      Attachments

        Activity

          People

            steve.silvester@mongodb.com Steve Silvester
            rohan.sharan@mongodb.com Rohan Sharan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: