Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-62289

Add unit tests for GetKeysByPrefix API

    XMLWordPrintable

Details

    Description

      The new API for prefix read and prefix mode block optimization is introduced as part of MB-61563.

      Unit tests should cover the following areas:
      1. SSTable unit test for block optimization (all keys with the same prefix go into the same block)
      2. Magma-level unit tests for Prefix Read and Write
      The unit tests should cover:
      a) Simple insert and read
      b) Overwrite keys - with new sstables generated between overwrites
      c) Compaction
      d) Generate the prefixed keys in randomized order. Have multiple sstables generated between insertions. Validate prefix read result

      You can familiarize with the API usage looking at magma_bench implementation.

      Example prefix read test using magma_bench:

      $ ./magma_bench /tmp/testdata --kvstore 1 --ndocs 1000000 --keylen 100 --keyprefixlen 32 --keys-per-prefix 500 --vallen 168 --nwriters 1 --memquota 17179869184 --benchmark writeSequential --batch-size 1000 --engine magma  --engine-config '{"EnableWAL":false,"LogLevel":"info","EnableUpdateStatusForSet":false, "DisableSplitValue":true}' --active-stats --clear-existing  --nwrites 1000000
       
      $ ./magma_bench /tmp/testdata --kvstore 1 --ndocs 1000000 --keylen 100 --keyprefixlen 32 --keys-per-prefix 500 --vallen 168 --memquota 1073741824 --benchmark readRandomPrefix  --batch-size 1000 --engine magma --active-stats --engine-config '{"EnableWAL":false,"LogLevel":"info","EnableUpdateStatusForSet":false, "DisableSplitValue":true, "EnableDirectIO":true, "EnableBlockCache":true}' --stats stats.4096.load  --nreads 35000000 --nreaders 1
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            anirudh.rowjee Anirudh Rowjee
            sarath Sarath Lakshman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty