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

join cursor reads main table

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.8.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Hi!
      I create join cursor which include conditions on two indexes. Cursor for first condition is ordering and has strategy="default", cursor for second condition use strategy="bloom". Main table has not records, satisfying conditions, so I assume that count of reads from main table will be small, and will be caused by false-positive errors of bloom filter. But it seems that WiredTiger reads main table a lot, although I think that it is not necessary. Attached program demonstrate number of readings of index files and main table for described scenario. It has next output:

      $ LD_LIBRARY_PATH=wiredtiger-2.7.0_develop ./jcursor_read_table                                                                                                                                                           
      Filling DB...
      total 0
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 0 -> /dev/pts/1
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 1 -> /dev/pts/1
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 2 -> /dev/pts/1
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 3 -> /home/dshkirja/issues/jcursor/jcursor_read_table.db/WiredTiger.lock
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 4 -> /home/dshkirja/issues/jcursor/jcursor_read_table.db/WiredTiger.wt
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 5 -> /home/dshkirja/issues/jcursor/jcursor_read_table.db/WiredTigerLAS.wt
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 6 -> /home/dshkirja/issues/jcursor/jcursor_read_table.db/main_index1.wti
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 7 -> /home/dshkirja/issues/jcursor/jcursor_read_table.db/main.wt
      lrwx------. 1 dshkirja orcgroup 64 Mar  4 18:03 8 -> /home/dshkirja/issues/jcursor/jcursor_read_table.db/main_index2.wti
      
      Reading join cursor...
      pread() fd stats:
      6:      393216
      7:      246059008
      8:      319488
      

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

              Created:
              Updated:
              Resolved: