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

Add upr vbucket takeover test cases

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 3.0
    • 3.0
    • None
    • Security Level: Public
    • None
    • 2
    • UPR - 1/30 - 2/17

    Description

      1. VBucket takeover with no items

      • Create an upr stream with the vbucket takeover flag
      • Check the stream stats and make sure the flags field reflects that the takeover flag was received.
      • Loop through the responses and make sure that you receive set state pending message, then a set state active message, and then an end stream message.

      2. VBucket takeover with 10 items

      • Insert 10 items
      • Create an upr stream with the vbucket takeover flag
      • Make sure that you receive 10 items and then a set state pending message
      • You should then receive no items and only a set state to active message followed by an end stream message

      3. VBucket takeover with 10 items, insert 10 more in the middle of the takeover

      • Insert 10 items
      • Create an upr stream with the vbucket takeover flag
      • Make sure that you receive 10 items and then a set state pending message
      • Before acking the set state pending message insert 10 new items
      • Ack the set state pending message and then expect to see the 10 you just added streamed out.
      • You will then get a set state active message. Before acking this message try to insert 1 more item. You should get a not my vbucket error.
      • Ack the message and then expect to receive an end stream message.
      • Check that the vbucket on the cluster is in dead state.

      4. VBucket takeover, insert 15k items to simulate reading off of disk, insert 100 more after takeover catches up

      • This test case is the same as 3 except with more items. If you write test case 3 in a general way that allows you to specify the amount of items for each step then this test case should be easy to implement.

      Note that when writing this test case you will need to ack the set state messages that are sent. You can do this by adding a new api to the UprClient called ack(...) and then specify the necessary fields. We can discuss this more if you have questions.

      The link below shows one of the vbucket takeover tests I wrote in ep-engine which might be helpful.
      https://github.com/membase/ep-engine/blob/master/tests/ep_testsuite.cc#L2813

      Attachments

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

        Activity

          People

            tommie Tommie McAfee (Inactive)
            mikew Mike Wiederhold [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty