History log of /6.6.0/kv_engine/engines/ep/tests/mock/mock_item_freq_decayer.h (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v7.1.1, v7.0.4, v7.1.0, v6.6.5-MP1, v6.6.5, v6.6.4, v7.0.2, v7.0.1, v6.6.3, v7.0.0, v6.6.2, v6.5.2, v6.0.5, v6.6.1, v6.5.1-MP5, v6.6.0, v6.5.1-MP3, v6.5.1, v6.0.4, v6.5.0, v6.0.3, v5.5.6, v6.0.2, v5.5.5, v5.5.4, v6.0.1, v5.5.3, v5.1.3, v6.0.0, v5.5.2, v5.5.1, v5.1.2, v5.5.0, v5.1.1
# d3ec2c0f 19-Apr-2018 Daniel Owen <owend@couchbase.com>

MB-29265: Ensure frequencyCounterSaturated callback is initialized

The function invoked when a storedValue's frequency counter becomes
saturated, is held as a callback within the hash table.
It is i

MB-29265: Ensure frequencyCounterSaturated callback is initialized

The function invoked when a storedValue's frequency counter becomes
saturated, is held as a callback within the hash table.
It is important that the callback is always intialized to a valid
function otherwise it will throw an exception if accidently invoked.

However this is a "safety net" because when creating vbucket either via
KVBucket::setVBucketState_UNLOCKED or Warmup::createVBuckets we should
set the function to the task responsible for waking the ItemFreqDecayer
task.

The issue was that we did not set the function in the warmup case,
furthermore as we did not initialize at construction it resulted in an
exception being thrown.

This patch addresses the issue by initializing the callback at
construction and also setting it it to the correct value in the warmup
case.

Change-Id: I966ecafa5c58606da16a210a5df8f039832fbd32
Reviewed-on: http://review.couchbase.org/92975
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# e717c5ac 29-Jan-2018 Daniel Owen <owend@couchbase.com>

MB-22010: Add ItemFreqDecayer Task for Eviction Algorithm

The new eviction algorithm requires us to record a counter for each item
in the hash table. When an item is referenced its counter is
incre

MB-22010: Add ItemFreqDecayer Task for Eviction Algorithm

The new eviction algorithm requires us to record a counter for each item
in the hash table. When an item is referenced its counter is
incremented (using a statistical accumulator).

To avoid the counters becoming saturated an "decayer" task is required
that reduces the counters on a periodic basis.

Change-Id: Iea74e578bd642aa08a4dff8658c880739e5daca4
Reviewed-on: http://review.couchbase.org/88499
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...