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

Restructure assert testing in search near 01 cpp for concurrency

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.2.0, 5.0.7
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 5
    • Storage - Ra 2021-11-29
    • v5.0, v4.4

      Context
      The search_near_01 tests prefix search near's performance. How it does this is through analysing the number of entries that have been traversed for a particular prefix search near. The test also attempts to stress the machine, through calling prefix search nears concurrently across multiple threads. Currently both the default and stress config has 10 threads. WT increases WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100 whenever it traverses an entry. Because WT increases the stat irrelevant of how many search nears are performing, the search near test accounts for this by factoring in the number of expected entries for one search near * the number of threads that are expected to perform search near.

              expected_entries = tc->thread_count * keys_per_prefix * pow(ALPHABET.size(), PREFIX_KEY_LEN - srchkey_len);
      

      Problem:
      The problem starts to appear when a thread performs multiple search nears before another thread can finish one search near. This will produces problems when calculating an accurate number of expected entries traversed across all the read threads. WT-8361, increases the expected_entries by three fold to account for this problem and is not ideal of a solution. This ticket aims to investigate better methods we can test prefix search near, and have an accurate number of expected entries for a prefix search near.

            Assignee:
            jie.chen@mongodb.com Jie Chen
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Alexey Anisimov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: