Fix "too many events occurred" for with_transaction/transaction-options.json

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • C Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Example task:

      ../src/mongocxx/test/spec/monitoring.cpp:136: failed: explicitly with 7 messages: 'checking for path from environment variable: WITH_TRANSACTION_TESTS_PATH' and 'test path is: /data/mci/3e93e787e01c64dd0bef116d82a613e0/mongo-cxx-driver/data/with_transaction' and 'Test path: /data/mci/3e93e787e01c64dd0bef116d82a613e0/mongo-cxx-driver/data/with_transaction/transaction-options.json' and 'Operation: { "name" : "insertOne", "object" : "collection", "arguments" : { "session" : "session0", "document" : { "_id" : 1 } }, "result" : { "insertedId" : 1 } }' and 'apm_checker.print_all() := "
      APM Checker contents:
      APM event: { "command_started_event" : { "command" : { "insert" : "test", "ordered" : true, "$db" : "withTransaction-tests", "lsid" : { "id" : { "$binary" : "Wg2EEKuxRHy8j7YexB5qGQ==", "$type" : "04" } }, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1761861030, "i" : 2102 } }, "signature" : { "hash" : { "$binary" : "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "$type" : "00" }, "keyId" : 0 } }, "readConcern" : { "level" : "snapshot" }, "startTransaction" : true, "txnNumber" : 1, "autocommit" : false, "documents" : [ { "_id" : 1 } ] }, "command_name" : "insert", "operation_id" : 3448411676172431315, "database_name" : "withTransaction-tests" } }
      "' and 'print_all() := "
      APM Checker contents:
      APM event: { "command_started_event" : { "command" : { "insert" : "test", "ordered" : true, "$db" : "withTransaction-tests", "lsid" : { "id" : { "$binary" : "Wg2EEKuxRHy8j7YexB5qGQ==", "$type" : "04" } }, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1761861030, "i" : 2102 } }, "signature" : { "hash" : { "$binary" : "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "$type" : "00" }, "keyId" : 0 } }, "readConcern" : { "level" : "snapshot" }, "startTransaction" : true, "txnNumber" : 1, "autocommit" : false, "documents" : [ { "_id" : 1 } ] }, "command_name" : "insert", "operation_id" : 3448411676172431315, "database_name" : "withTransaction-tests" } }
      APM event: { "command_started_event" : { "command" : { "abortTransaction" : 1, "$db" : "admin", "lsid" : { "id" : { "$binary" : "Wg2EEKuxRHy8j7YexB5qGQ==", "$type" : "04" } }, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1761861030, "i" : 2188 } }, "signature" : { "hash" : { "$binary" : "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "$type" : "00" }, "keyId" : 0 } }, "writeConcern" : { "w" : "majority" }, "txnNumber" : 1, "autocommit" : false }, "command_name" : "abortTransaction", "operation_id" : 3448411676172431316, "database_name" : "admin" } }
      APM event: { "command_started_event" : { "command" : { "insert" : "test", "ordered" : true, "$db" : "withTransaction-tests", "lsid" : { "id" : { "$binary" : "Wg2EEKuxRHy8j7YexB5qGQ==", "$type" : "04" } }, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1761861030, "i" : 2279 } }, "signature" : { "hash" : { "$binary" : "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "$type" : "00" }, "keyId" : 0 } }, "readConcern" : { "level" : "snapshot", "afterClusterTime" : { "$timestamp" : { "t" : 1761861030, "i" : 2279 } } }, "startTransaction" : true, "txnNumber" : 2, "autocommit" : false, "documents" : [ { "_id" : 1 } ] }, "command_name" : "insert", "operation_id" : 3448411676172431317, "database_name" : "withTransaction-tests" } }
      APM event: { "command_started_event" : { "command" : { "commitTransaction" : 1, "recoveryToken" : { "recoveryShardId" : "sh01" }, "$db" : "admin", "lsid" : { "id" : { "$binary" : "Wg2EEKuxRHy8j7YexB5qGQ==", "$type" : "04" } }, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1761861030, "i" : 2279 } }, "signature" : { "hash" : { "$binary" : "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "$type" : "00" }, "keyId" : 0 } }, "writeConcern" : { "w" : "majority" }, "txnNumber" : 2, "autocommit" : false }, "command_name" : "commitTransaction", "operation_id" : 3448411676172431318, "database_name" : "admin" } }
      "' and 'Too many events occurred: expected exactly 2 events, but got 4 events'
      

            Assignee:
            Unassigned
            Reporter:
            Ezra Chung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: