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-58576 [1/2]: Fix memory tracking in StrictQuotaItemPager
StrictQuotaItemPager - as introduced via MB-53053 for cross-Bucket
frequency counter based eviction (specifically
https://review.couchbase.org/c/kv_engine/+/183324) - constructs its
base class GlobalTask via the ctor taking a Taskable, not the ctor
taking a EventuallyPersistentEngine.
This is problematic as when the task runs, the execution pools do not
switch to the current engine (as GlobalTask::engine is null) - and as
a result any (de)allocations made - say during paging - are not
correctly accounted to the associated bucket - they end up being
accounted to the 'NoBucket'.
The bug is somewhat subtle, as ItemPager has it's /own/ 'engine'
member variable (which is initialised correctly), however given this
shadows the (null) base class one which is used by the ExecutorPool to
setup the current engine, we end up with switched to a null engine.
Fix by adding an ItemPager ctor taking an Engine and using that for
StrictQuotaItemPager.
Change-Id: I4e13d547e4e21f1e67e65bbe06d41f05bbc11ac9
Reviewed-on: https://review.couchbase.org/c/kv_engine/+/196871
Reviewed-by: Trond Norbye <[email protected]>
Tested-by: Build Bot <[email protected]>
0 commit comments