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

Problem duplicating index cursor with custom collator

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.2, 3.2.13, 3.4.3, 3.5.4
    • Affects Version/s: 3.5.3
    • Component/s: None
    • None

      Originally reported in WT-3135, as it seems to be related to fixes made for that report.
      Dmitri Shubin reports:

      Attaching test that shows the problem I see when duplicating index cursor.
      When running on current master (13d9445) I get:

      $ ./index_cursor_dup
      adding new record
      positioning index cursor
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = <empty>
      duplicating cursor
      index_compare: ikey1 = 17, pkey1 = 13, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = 13, ikey2 = 17, pkey2 = 13
      

      But on develop (a8fe040):

      $ ./index_cursor_dup
      adding new record
      positioning index cursor
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = <empty>, ikey2 = 17, pkey2 = <empty>
      duplicating cursor
      index_compare: ikey1 = 17, pkey1 = 13, ikey2 = 17, pkey2 = 13
      index_compare: ikey1 = 17, pkey1 = 13, ikey2 = 17, pkey2 = <empty>
      session->open_cursor(session, NULL, cursor, NULL, &cursor1) at (index_cursor_dup.c:110) failed: No such file or directory [2]
      

      Probably the reason is that collator should handle absence of primary keys a bit differently.
      Please advise.

        1. index_cursor_dup.c
          3 kB
          Donald Anderson

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: