WT full support for WT_CURSOR->modify in disagg storage

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines, Storage Engines - Transactions
    • None
    • None

      Here are two items related to modify.  One is that running test/format, an assert is tripped

      #3  0x0000fffff7c65adc in __wt_abort (session=0xaaaaaac655e8)
          at /home/dda/wt/git/sls-1540-test-format-initial/src/os_common/os_abort.c:30
      #4  0x0000fffff7baeeb8 in __clayered_modify (cursor=0xffff6c0e4660, entries=0xaaaaad4e0a28, nentries=5)
          at /home/dda/wt/git/sls-1540-test-format-initial/src/cursor/cur_layered.c:1926
      #5  0x0000aaaaaaac2f60 in modify (tinfo=0xaaaaad4e0810, cursor=0xffff6c0e4660, positioned=false)
          at /home/dda/wt/git/sls-1540-test-format-initial/test/format/ops.c:1808
      #6  0x0000aaaaaaac3114 in row_modify (tinfo=0xaaaaad4e0810, positioned=false)
          at /home/dda/wt/git/sls-1540-test-format-initial/test/format/ops.c:1838
      #7  0x0000aaaaaaabef24 in table_op (tinfo=0xaaaaad4e0810, intxn=true, iso_level=ISOLATION_SNAPSHOT, op=MODIFY)
          at /home/dda/wt/git/sls-1540-test-format-initial/test/format/ops.c:797
      #8  0x0000aaaaaaac05b4 in ops (arg=0xaaaaad4e0810)
          at /home/dda/wt/git/sls-1540-test-format-initial/test/format/ops.c:1302
       

      The line is:

          WT_ASSERT(
            session, F_MASK(clayered->current_cursor, WT_CURSTD_VALUE_SET) == WT_CURSTD_VALUE_INT); 

      In this case, the value is not internal, it points to the memory buffer within the cursor->value:

       (gdb) p clayered->current_cursor->value
      $10 = {data = 0xffff6c2c7230, size = 78, mem = 0xffff6c2c7230, memsize = 3098, flags = 0}
      

      And the value in that buffer AFAICT looks correct. So maybe we can't depend on modify returning an internal buffer? What would be the consequences of allowing that?

      Second, related to modify, this comment at the top of the layered cursor modify functions:

       *     WT_CURSOR->modify method for the layered cursor type. This function assumes the modify will
       *     be done on the btree that we originally calculate the diff from. Currently, we only allow
       *     writes to the stable table so the assumption holds. TODO: revisit this when we enable writing
       *     to the ingest table.

      The test/format test was only in leader mode, so it doesn't apply to the situation in item one, but we'll soon need modify capability for follower mode.

      Maybe we haven't seen this because the use of modify is turned off in the server? Will we need it eventually?

            Assignee:
            Unassigned
            Reporter:
            Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: