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

KVShard::setLowPriorityVbSnapshotFlag not working as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0.0
    • 3.1.0, 4.0.0
    • couchbase-bucket
    • Security Level: Public
    • All
    • Untriaged
    • Unknown

    Description

      bool KVShard::setLowPriorityVbSnapshotFlag(bool lowPriority)

      { bool inverse = !lowPriority; return lowPrioritySnapshot.compare_exchange_strong(inverse, lowPrioritySnapshot); }

      the compare exchange will compare lowPrioritySnapshot with !lowPriority if they are != nothing changes. If they are == lowPrioritySnapshot is replaced with lowPrioritySnapshot. And hence it still doesn't change.

      The fix is that the 2nd parameter should be changed from lowPrioritySnapshot to lowPriority.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-15990
          # Subject Branch Project Status CR V

          Activity

            People

              owend Daniel Owen
              owend Daniel Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty