According to a comment in include/dhandle.h the flags field of WT_DATA_HANDLE should only use 8 values. But there are 9 possible values defined there:
/* Flags values over 0xff are reserved for WT_BTREE_* */ /* AUTOMATIC FLAG VALUE GENERATION START */ #define WT_DHANDLE_DEAD 0x001u /* Dead, awaiting discard */ #define WT_DHANDLE_DISCARD 0x002u /* Close on release */ #define WT_DHANDLE_DISCARD_KILL 0x004u /* Mark dead on release */ #define WT_DHANDLE_DROPPED 0x008u /* Handle is dropped */ #define WT_DHANDLE_EXCLUSIVE 0x010u /* Exclusive access */ #define WT_DHANDLE_HS 0x020u /* History store table */ #define WT_DHANDLE_IS_METADATA 0x040u /* Metadata handle */ #define WT_DHANDLE_LOCK_ONLY 0x080u /* Handle only used as a lock */ #define WT_DHANDLE_OPEN 0x100u /* Handle is open */ /* AUTOMATIC FLAG VALUE GENERATION STOP */
I don't understand the restriction of flag values here, but this looks like an accident waiting to happen and should be fixed.
(Alternately, perhaps the comment is out of data or misleading, in which case it should be fixed instead.)
- related to
-
WT-7520 Add start and stop values to automatic flag generation code
- Closed