Version 10.0.0
Data Handles and Btrees (Architecture Guide)
Data StructuresSource Location
WT_BTREE
WT_DHANDLE
src/include/btree.h
src/include/dhandle.h
src/conn/conn_dhandle.c
src/session/session_dhandle.c

An internal structure called a Data Handle (dhandle) is used to represent and access Btrees and other data sources in WiredTiger. A dhandle is created when a table is accessed for the first time. It is kept in a global list and is shared across the sessions. When a dhandle is not needed anymore and has been idle for a while, it is closed and destroyed, releasing all the resources associated with it.

A Btree is one kind of dhandle. It embodies both the on-disk and in-memory representations of the Btree.

Data Handle Lifecycle

This section describes how dhandles are created, and how and when they are destroyed.