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

CDC: historyStartSeqno unexpectedly goes back to 0

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      Requires unmerged changes... test can be disabled if we want to merge and fix...

      In the KV change are new unit tests so requires all KV unit tests building.

      The failing unit test is

      > ./ep-engine_ep_unit_tests --gtest_filter=MagmaKVStoreTest.historyStartSeqno
      Note: Google Test filter = MagmaKVStoreTest.historyStartSeqno
      [==========] Running 1 test from 1 test suite.
      [----------] Global test environment set-up.
      [----------] 1 test from MagmaKVStoreTest
      [ RUN      ] MagmaKVStoreTest.historyStartSeqno
      /Users/jimwalker/Code/couchbase/neo/kv_engine/engines/ep/tests/module_tests/magma-kvstore_test.cc:829: Failure
      Expected equality of these values:
        expectedHistoryStartSeqno
          Which is: 3
        bySeq->historyStartSeqno
          Which is: 0
      Google Test trace:
      /Users/jimwalker/Code/couchbase/neo/kv_engine/engines/ep/tests/module_tests/magma-kvstore_test.cc:844: History ON flushed seqno 4
      /Users/jimwalker/Code/couchbase/neo/kv_engine/engines/ep/tests/module_tests/magma-kvstore_test.cc:841: History ON flushed seqno 3
      /Users/jimwalker/Code/couchbase/neo/kv_engine/engines/ep/tests/module_tests/magma-kvstore_test.cc:834: History OFF
      [  FAILED  ] MagmaKVStoreTest.historyStartSeqno (25 ms)
      [----------] 1 test from MagmaKVStoreTest (26 ms total)
       
      [----------] Global test environment tear-down
      [==========] 1 test from 1 test suite ran. (26 ms total)
      [  PASSED  ] 0 tests.
      [  FAILED  ] 1 test, listed below:
      [  FAILED  ] MagmaKVStoreTest.historyStartSeqno
      

      The test code is here -> https://review.couchbase.org/c/kv_engine/+/185684/2/engines/ep/tests/module_tests/magma-kvstore_test.cc#804

      The test is using MagmaKVStore directly and testing that the historyStartSeqno GetOldestSeqno follows expectations.

      The test is reading and comparing GetOldestSeqno from both snapshot and kvid variants.

      The test begins by storing an item(seqno 2) and history is disabled - we see that the oldest seqno is 0.

      • Next flush seqno 3 with history enabled - validates oldest seqno is 3
      • Next flush seqno 4 with history enabled - validates oldest seqno is 3

      This is where the test fails.

      • GetOldestSeqno(kvid) returned 3
      • GetOldestSeqno(snapshot) returned 0 (this happens inside initBySeqnoContext and GetOldestSeqno is assigned to ScanContext::historyStartSeqno)

      Attachments

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

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty