Bug fix in tree clear and size check where sometimes there could still be old versions of pages in use because not enough commits have passed for them to be rolled off and freed.
This commit is contained in:
parent
4e9c3164a8
commit
0c95fef8aa
|
@ -2812,6 +2812,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
debug_printf("LazyDelete: freed %d pages, %s has %" PRId64 " entries\n", freedPages, self->m_lazyDeleteQueue.name.c_str(), self->m_lazyDeleteQueue.numEntries);
|
||||
return freedPages;
|
||||
}
|
||||
|
||||
|
@ -2923,10 +2924,10 @@ public:
|
|||
self->clear(KeyRangeRef(dbBegin.key, dbEnd.key));
|
||||
|
||||
loop {
|
||||
int freedPages = wait(self->incrementalSubtreeClear(self));
|
||||
debug_printf("incrementalSubtreeClear freed %d\n", freedPages);
|
||||
state int freedPages = wait(self->incrementalSubtreeClear(self));
|
||||
wait(self->commit());
|
||||
if(self->m_lazyDeleteQueue.numEntries == 0) {
|
||||
// Keep looping until the last commit doesn't do anything at all
|
||||
if(self->m_lazyDeleteQueue.numEntries == 0 && freedPages == 0) {
|
||||
break;
|
||||
}
|
||||
self->setWriteVersion(self->getLatestVersion() + 1);
|
||||
|
|
Loading…
Reference in New Issue