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

Incorrect sCtx binding in recovery cleaner

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Morpheus
    • 7.2.5, 7.6.2
    • storage-engine
    • Triaged
    • 0
    • Unknown
    • Plasma-Aug21-2024, Plasma-Sep9-2024

    Description

      In the recoveryCleaner code, sCtx's are binded to the recoveryLSS. (Ref: recovery_cleaner.go#L719)

      This binding is correct while calculating recoveryLSSStats in recoveryCleaner.CleanLSS() (Ref: recovery_cleaner.go#L382)

      However, there is an issue in recoveryCleaner.tryPageRelocation, which calls tryPageRemoval (Ref: recovery_cleaner.go#L203)
      The wCtx passed to tryPageRemoval has its sCtx binded to the recoveryLSS, but the flushStats updated within tryPageRemoval should be associated with dataLSS, not recoveryLSS.

      As a result of this issue, recoveryCleaner.GetLSSInfo() may compute fragmentation incorrectly, which can lead to issues with triggering the recoveryLSSCleaner.

      Attachments

        Activity

          People

            jinesh.parakh Jinesh Parakh
            jinesh.parakh Jinesh Parakh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              PagerDuty