Skip to content

Commit db4a947

Browse files
owend74daverigby
authored andcommitted
MB-32591: Enable checkpoint expelling
This patch enables the functionality to expel items from the oldest checkpoint that still has cursors in it. This can include the open checkpoint. Items are expelled items from checkpoints to reduce memory usage. It is applied before cursor dropping is attempted. Expelling is achieved by identifying the oldest checkpoint that has cursors still in it. Then identifying where the first cursor is located. For example in the diagram below it is seqno 1004. low high dummy seqno seqno | | | | | | \./ \./ \./ -------------------------------------------------- | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | -------------------------------------------------- /.\ /.\ | | | | cursor 1 cursor 2 It first swaps the dummy item with the item pointed to by cursor 1. It then expels items from the start of the checkpoint upto where the dummy item is newly located. This means expelling 1004, 1001, 1002 and 1003. After the expel operation the checkpoint in memory is follows. low high dummy seqno seqno | | | | | | \./ \./ \./ --------------------- 1000 | 1005 | 1006 | --------------------- /.\ /.\ | | | | cursor 1 cursor 2 Change-Id: Ie197648d0035510a5728ce0c4a06f279a6968e76 Reviewed-on: http://review.couchbase.org/109890 Reviewed-by: Dave Rigby <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent f1a4e7e commit db4a947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engines/ep/configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
}
171171
},
172172
"chk_expel_enabled": {
173-
"default" : "false",
173+
"default" : "true",
174174
"descr": "Enable the ability to expel (remove from memory) items from a checkpoint. An item can be expelled if all cursors in the checkpoint have iterated past the item.",
175175
"dynamic" : true,
176176
"type": "bool"

0 commit comments

Comments
 (0)