Commit 0932c43f authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:3720], add some comments

git-svn-id: file:///svn/toku/tokudb@32914 c7de825b-a66e-492c-adef-691d508d4ae1
parent 59456870
......@@ -1259,6 +1259,11 @@ static void flush_and_maybe_remove (CACHETABLE ct, PAIR p) {
static int maybe_flush_some (CACHETABLE ct, long size) {
int r = 0;
//
// this is the data that cannot be accessed right now, because it has a user
// If all the data is unattainable, we get into an infinite loop, so we count it with
// the limit
//
u_int32_t unattainable_data = 0;
while ((ct->head) && (size + ct->size_current > ct->size_limit + unattainable_data)) {
......@@ -1269,7 +1274,6 @@ static int maybe_flush_some (CACHETABLE ct, long size) {
flush_dirty_pair(ct, curr_in_clock);
}
if (curr_in_clock->count > 0) {
// TODO: (Zardosht), this is where the callback function for node level eviction will happen
if (curr_in_clock->state == CTPAIR_IDLE && !rwlock_users(&curr_in_clock->rwlock)) {
curr_in_clock->count--;
// call the partial eviction callback
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment