You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BP] MB-36802: Don't return estimate=0 for dcp-takeover stats before backfill
[Backport of MB-35594.]
The 'dcp-takeover' stats are used by ns_server to estimate how many
mutations are remaining on a DCP stream. However, the estimate value
is not updated until the backfill task has run once (and scanned the
disk file). As such, if 'dcp-takeover' stats are requested before that
first backfil task has run, then they can incorrectly report '0'
backfill items.
To address this, change backfillRemaining to be of type
boost::optional, initialized to an empty optional.
Only when the backfill scan has completed (when the number of items
remaining is determined) is the optional populated.
Then, when stats are requested use a new status value
"calculating-item-count" if the optional is empty (i.e. before scan).
Change-Id: Ia11dfe830ebd690bb40884594992acbcd21c104d
Reviewed-on: http://review.couchbase.org/118410
Well-Formed: Build Bot <[email protected]>
Tested-by: Build Bot <[email protected]>
Reviewed-by: Dave Rigby <[email protected]>
0 commit comments