summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/dhandle.h
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-06-21 15:40:32 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-21 06:08:48 +0000
commit803f94f06a1198b097cf84b0ebbbe8c3f073797d (patch)
tree085643b5eeb40768d1445e541ee36a7ec8604ac4 /src/third_party/wiredtiger/src/include/dhandle.h
parentfca4506a72e32e2346ddaa7e0a7d9d59f2138d8e (diff)
downloadmongo-803f94f06a1198b097cf84b0ebbbe8c3f073797d.tar.gz
Import wiredtiger: 3f236c96583ed1d746cd04bd72df5e9d15926a7c from branch mongodb-5.0
ref: e78819461f..3f236c9658 for: 5.1.0 WT-7520 Add start and stop values to automatic flag generation code
Diffstat (limited to 'src/third_party/wiredtiger/src/include/dhandle.h')
-rw-r--r--src/third_party/wiredtiger/src/include/dhandle.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/third_party/wiredtiger/src/include/dhandle.h b/src/third_party/wiredtiger/src/include/dhandle.h
index c17970f4760..133ab688544 100644
--- a/src/third_party/wiredtiger/src/include/dhandle.h
+++ b/src/third_party/wiredtiger/src/include/dhandle.h
@@ -113,12 +113,8 @@ struct __wt_data_handle {
/*
* Flags values over 0xfff are reserved for WT_BTREE_*. This lets us combine the dhandle and btree
* flags when we need, for example, to pass both sets in a function call.
- *
- * To help avoid accidental overrun of the flag values, we add a special flag value that should
- * always be the last and highest. We use this value to assert that the dhandle flags haven't run
- * into the space reserved for btree flags.
*/
-/* AUTOMATIC FLAG VALUE GENERATION START */
+/* AUTOMATIC FLAG VALUE GENERATION START 0 */
#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 */
@@ -128,15 +124,10 @@ struct __wt_data_handle {
#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 */
-#define WT_DHANDLE_ZZZ_ENDFLAG 0x200u /* One past highest flag value */
- /* AUTOMATIC FLAG VALUE GENERATION STOP */
+ /* AUTOMATIC FLAG VALUE GENERATION STOP 12 */
uint32_t flags;
-#define WT_DHANDLE_MAX_FLAG 0x1000u /* Used to ensure we don't overflow legal flag values */
-#if WT_DHANDLE_ZZZ_ENDFLAG > WT_DHANDLE_MAX_FLAG
-#error "Too many dhandle flags"
-#endif
-/* AUTOMATIC FLAG VALUE GENERATION START */
+/* AUTOMATIC FLAG VALUE GENERATION START 0 */
#define WT_DHANDLE_ASSERT_TS_READ_ALWAYS 0x001u /* Assert read always checking. */
#define WT_DHANDLE_ASSERT_TS_READ_NEVER 0x002u /* Assert read never checking. */
#define WT_DHANDLE_ASSERT_TS_WRITE 0x004u /* Assert write checking. */
@@ -146,6 +137,6 @@ struct __wt_data_handle {
#define WT_DHANDLE_TS_NEVER 0x040u /* Handle never using timestamps checking. */
#define WT_DHANDLE_TS_ORDERED 0x080u /* Handle using ordered timestamps checking. */
#define WT_DHANDLE_VERB_TS_WRITE 0x100u /* Handle verbose logging for timestamps usage. */
- /* AUTOMATIC FLAG VALUE GENERATION STOP */
+ /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */
uint32_t ts_flags;
};