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

Incompatible types being used in Workgen

    • 1
    • BermudaTriangle- 2023-09-05

      In Workgen, there is a function called kv_compute_max that derives the maximum size a key/value can be.

      _key._size and _value._size are int and they are assigned to internal->_keysize and internal->_valuesize which are of type uint_t.

      The max size is computed this way:

          uint64_t max;
          if (size > 1)
              max = power64(10, (size - 1)) - 1;
          else
              max = 0;
      

      And then it is assigned to internal->_keymax and internal->_valuemax which are of type uint_t.

      Everything could be changed to uint64_t.

            Assignee:
            mick.graham@mongodb.com Mick Graham
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: