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

[BP 7.0.4] - ViewEngine doesn't handle the case of empty default-collection

    XMLWordPrintable

Details

    • Triaged
    • 1
    • Unknown

    Description

      CC Sujay Gad, Ankit Prabhu

      Test scenario:

      1. 1-node cluster, 1 bucket
      2. Store 1 alive doc + delete it -> just deletion at seqno:2 in the default collection
      3. Create a custom collection and store a doc in it
      4. Run compaction (use cbcompact with the right params for purging everything immediately) -> seqno:2 is purged, the default collection becomes empty
      5. Create a view on the UI

      View creation gets stuck forever.

      Views looping on:

      couchdb:debug,2022-01-13T10:55:26.976+01:00,couchdb_n_0@cb.local:<0.20961.1>:couch_log:debug:27]Updater set view `example`, main group `_design/dev_test` Partition versions [{0,[{141906844413187,0}]}]
      [couchdb:info,2022-01-13T10:55:26.976+01:00,couchdb_n_0@cb.local:<0.20967.1>:couch_log:info:30]Updater reading changes from active partitions to update main set view group `_design/dev_test` from set `example`
      [couchdb:info,2022-01-13T10:55:26.977+01:00,couchdb_n_0@cb.local:<0.20967.1>:couch_log:info:30]Updater for main set view group `_design/dev_test`, set `example` (prod), read a total of 0 changes
      [couchdb:debug,2022-01-13T10:55:26.977+01:00,couchdb_n_0@cb.local:<0.20967.1>:couch_log:debug:27]Updater for main set view group `_design/dev_test`, set `example`, max partition seqs found:
      

      KV:

      2022-01-13T10:55:27.094391+01:00 INFO 52: (example) DCP (Producer) eq_dcpq:mapreduce_view: example _design/dev_test (prod/main) - (vb:0) Creating stream with start seqno 0 and end seqno 2; requested end seqno was 2, collections-filter-size:1 sid:none
      2022-01-13T10:55:27.094430+01:00 INFO 52: (example) DCP (Producer) eq_dcpq:mapreduce_view: example _design/dev_test (prod/main) - (vb:0) ActiveStream::scheduleBackfill_UNLOCKED register cursor with name "eq_dcpq:mapreduce_view: example _design/dev_test (prod/main)" backfill:true, seqno:4
      2022-01-13T10:55:27.094503+01:00 INFO 52: (example) DCP (Producer) eq_dcpq:mapreduce_view: example _design/dev_test (prod/main) - (vb:0) Scheduling backfill from 1 to 2, reschedule flag : False
      2022-01-13T10:55:27.094873+01:00 WARNING 52: (example) DCP (Producer) eq_dcpq:mapreduce_view: example _design/dev_test (prod/main) - (vb:0) DCPBackfillBySeqnoDisk::markLegacyDiskSnapshot failed getBySeqno no such key
      2022-01-13T10:55:27.094901+01:00 WARNING 52: (example) DCP (Producer) eq_dcpq:mapreduce_view: example _design/dev_test (prod/main) - (vb:0) Stream closing, sent until seqno 0 remaining items 0, reason: The stream closed early due to backfill failure
      2022-01-13T10:55:27.094952+01:00 WARNING 52: (example) DCP (Producer) eq_dcpq:mapreduce_view: example _design/dev_test (prod/main) - (vb:0) ActiveStream::completeBackfillInner: Unexpected state_:dead
      

      Attachments

        Issue Links

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

          Activity

            The fix for this issue first needs the patch : https://review.couchbase.org/c/kv_engine/+/169030 backported to 7.0.4 followed by the corresponding couchdb backport.

            Dave Rigby Can you please check and confirm whether the kv patch for the same is in 7.0.4 ? I don't see this patch in the CC branch.

            Thanks!

            abhishek.jindal Abhishek Jindal added a comment - The fix for this issue first needs the patch : https://review.couchbase.org/c/kv_engine/+/169030 backported to 7.0.4 followed by the corresponding couchdb backport. Dave Rigby Can you please check and confirm whether the kv patch for the same is in 7.0.4 ? I don't see this patch in the CC branch. Thanks!
            drigby Dave Rigby added a comment -

            Daniel Owen Given I'm out next week, assigning to you to arrange for the backport.

            drigby Dave Rigby added a comment - Daniel Owen Given I'm out next week, assigning to you to arrange for the backport.

            The desired change https://review.couchbase.org/c/kv_engine/+/169030 was built on top of various other changes that are not present in the CC branch. I'm in the process of trying to backport it but have to unpick various conflicts to find changes that this was built on top of.

            ben.huddleston Ben Huddleston added a comment - The desired change https://review.couchbase.org/c/kv_engine/+/169030 was built on top of various other changes that are not present in the CC branch. I'm in the process of trying to backport it but have to unpick various conflicts to find changes that this was built on top of.
            wayne Wayne Siu added a comment -

            Resolved as "Won't fix"
            cc: Stephen Bream for release notes.

            wayne Wayne Siu added a comment - Resolved as "Won't fix" cc: Stephen Bream for release notes.

            People

              steve.bream Stephen Bream (Inactive)
              jeelan.poola Jeelan Poola
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty