Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-10504

Workgen does not support multiple operations in a transaction

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 3
    • c(3x10^8)-StorEng - 2023-11-14

      I tried to define the following workload:

      ops = Operation(Operation.OP_INSERT, Table(tname), Key(Key.KEYGEN_APPEND, 10), Value(40))
      ins_txn_ops = op_group_transaction(ops, 2, "")
      thread = Thread(ins_txn_ops)
      

      This should create a thread that does 2 inserts per transaction. However, I am not sure it does what it's supposed to do.

      First of all, in core.py, where op_group_transaction is defined, I don't see where the number of operations per transaction (ops_per_txn) is associated with the transaction. This is the current code:

      def op_group_transaction(ops_arg, ops_per_txn, txn_config):
          if ops_arg != Operation.OP_NONE:
              return txn(ops_arg, txn_config)
      ...
      

      Then, in workgen.cpp, at the end of the op_run function, we can see a bunch of commit_transaction calls when _in_transaction is true but none of them checks if the operation has executed the expected number of operations associated with the transaction.

      This ticket should make sure Workgen can define and handle multiple operations within the same transaction.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: