[BP 7.0.2] - Plasma Stats Compact Counter not updated on CompactFullMarshal

Description

On Page Marshal, a page can get compacted if CompactFullMarshal is enabled. We are not updating the compacts counter in code paths involving LSSCleaner, Persist after a page is Marshalled.

 

// Compact the page if going through full marshal
func (pg *page) compactFullMarshal(maxSegments int) (bool, int, int) {
if pg.ctx.CompactFullMarshal &&
pg.head != nil &&
pg.head.GetOp() != opBasePage &&
pg.head.GetOp() != opPageRemoveDelta &&
pg.head.GetOp() != opMetaDelta {
// full marshal required?
if_, fInfo := pg.findFlushInfo(); fInfo != nil {
if fInfo.NumSegments > maxSegments {
dataSz, hdrSz := pg.Compact()
returntrue, dataSz, hdrSz
{{}}}
{{}}}
{{}}}
returnfalse, 0, 0
{{}}}

 

Components

Affects versions

Fix versions

Labels

Environment

None

Link to Log File, atop/blg, CBCollectInfo, Core dump

None

Release Notes Description

None

Activity

Srinath Duvuru September 3, 2021 at 10:48 PM

The change is straightforward and has unit tests to validate. No specific test needed.

CB robot August 18, 2021 at 2:55 AM

Build couchbase-server-7.0.2-6529 contains plasma commit 268b4b3 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-47992#icft=MB-47992 [BP]: Fix compact count due to compactFullMarshal

Srinath Duvuru August 17, 2021 at 7:59 PM

 Please approve this fix for 7.0.2. This fixes a stats that was missed in one case. This will help in avoiding inconsistent stats. The fix is straightforward. Return value of a function changed causing a number of files to be updated but the impact is minimal. 

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Is this a Regression?

Unknown

Triage

Untriaged

Story Points

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created August 17, 2021 at 5:54 PM
Updated September 3, 2021 at 10:48 PM
Resolved August 18, 2021 at 3:19 PM
Instabug

Flag notifications