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
MB-35594: Don't return estimate=0 for dcp-takeover stats before backfill
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: Id7049a0c13a8aab429f137d2f4b293567e360638
Reviewed-on: http://review.couchbase.org/114894
Tested-by: Build Bot <[email protected]>
Reviewed-by: James Harrison <[email protected]>
Reviewed-by: Ben Huddleston <[email protected]>
0 commit comments