question about eviction of WT

Skip to first unread message


Feb 27, 2022, 9:18:28 PMFeb 27
to wiredtiger-users
Hi everyone,
Recently I read the source-code of eviction in WiredTiger, we all know that every WT btree node is a page(extent) which in disk. 
So when a dirty leaf page reconcile into disk, I want to know whether all nodes rooted to the leaf node require cascading reconcile, just like traditional persistence B+Tree? 
I didn't notice anything like that. If not, how does WT ensure that the parent node points to the new leaf page after the restart?

Feb 28, 2022, 4:13:35 PMFeb 28
to wiredtiger-users

Thanks for your interest in WiredTiger. The answer is that there is no need to synchronously update on-disk internal pages when a leaf page is reconciled, the in-memory data structures will be updated in the cache which allows the newly reconciled leaf page to be found.

There is a process called checkpoint in WiredTiger - the job of checkpoint is to ensure that there is a fully traversable on-disk tree. That process will ensure that all leaf pages and their parent (internal) pages up to the root are written to disk.

- Alex
Reply all
Reply to author
0 new messages