1 /*-
2  * Copyright (c) 2014-2018 MongoDB, Inc.
3  * Copyright (c) 2008-2014 WiredTiger, Inc.
4  *	All rights reserved.
5  *
6  * See the file LICENSE for redistribution information.
7  */
8 
9 /*******************************************
10  * Global per-process structure.
11  *******************************************/
12 /*
13  * WT_PROCESS --
14  *	Per-process information for the library.
15  */
16 struct __wt_process {
17 	WT_SPINLOCK spinlock;		/* Per-process spinlock */
18 
19 					/* Locked: connection queue */
20 	TAILQ_HEAD(__wt_connection_impl_qh, __wt_connection_impl) connqh;
21 	WT_CACHE_POOL *cache_pool;
22 #define	WT_TSC_DEFAULT_RATIO	1.0
23 	double	 tsc_nsec_ratio;	/* rdtsc ticks to nanoseconds */
24 	bool use_epochtime;		/* use expensive time */
25 
26 					/* Checksum function */
27 #define	__wt_checksum(chunk, len)	__wt_process.checksum(chunk, len)
28 	uint32_t (*checksum)(const void *, size_t);
29 };
30 extern WT_PROCESS __wt_process;
31 
32 /*
33  * WT_KEYED_ENCRYPTOR --
34  *	An list entry for an encryptor with a unique (name, keyid).
35  */
36 struct __wt_keyed_encryptor {
37 	const char *keyid;		/* Key id of encryptor */
38 	int owned;			/* Encryptor needs to be terminated */
39 	size_t size_const;		/* The result of the sizing callback */
40 	WT_ENCRYPTOR *encryptor;	/* User supplied callbacks */
41 					/* Linked list of encryptors */
42 	TAILQ_ENTRY(__wt_keyed_encryptor) hashq;
43 	TAILQ_ENTRY(__wt_keyed_encryptor) q;
44 };
45 
46 /*
47  * WT_NAMED_COLLATOR --
48  *	A collator list entry
49  */
50 struct __wt_named_collator {
51 	const char *name;		/* Name of collator */
52 	WT_COLLATOR *collator;		/* User supplied object */
53 	TAILQ_ENTRY(__wt_named_collator) q;	/* Linked list of collators */
54 };
55 
56 /*
57  * WT_NAMED_COMPRESSOR --
58  *	A compressor list entry
59  */
60 struct __wt_named_compressor {
61 	const char *name;		/* Name of compressor */
62 	WT_COMPRESSOR *compressor;	/* User supplied callbacks */
63 					/* Linked list of compressors */
64 	TAILQ_ENTRY(__wt_named_compressor) q;
65 };
66 
67 /*
68  * WT_NAMED_DATA_SOURCE --
69  *	A data source list entry
70  */
71 struct __wt_named_data_source {
72 	const char *prefix;		/* Name of data source */
73 	WT_DATA_SOURCE *dsrc;		/* User supplied callbacks */
74 					/* Linked list of data sources */
75 	TAILQ_ENTRY(__wt_named_data_source) q;
76 };
77 
78 /*
79  * WT_NAMED_ENCRYPTOR --
80  *	An encryptor list entry
81  */
82 struct __wt_named_encryptor {
83 	const char *name;		/* Name of encryptor */
84 	WT_ENCRYPTOR *encryptor;	/* User supplied callbacks */
85 					/* Locked: list of encryptors by key */
86 	TAILQ_HEAD(__wt_keyedhash, __wt_keyed_encryptor)
87 				keyedhashqh[WT_HASH_ARRAY_SIZE];
88 	TAILQ_HEAD(__wt_keyed_qh, __wt_keyed_encryptor) keyedqh;
89 					/* Linked list of encryptors */
90 	TAILQ_ENTRY(__wt_named_encryptor) q;
91 };
92 
93 /*
94  * WT_NAMED_EXTRACTOR --
95  *	An extractor list entry
96  */
97 struct __wt_named_extractor {
98 	const char *name;		/* Name of extractor */
99 	WT_EXTRACTOR *extractor;		/* User supplied object */
100 	TAILQ_ENTRY(__wt_named_extractor) q;	/* Linked list of extractors */
101 };
102 
103 /*
104  * WT_CONN_CHECK_PANIC --
105  *	Check if we've panicked and return the appropriate error.
106  */
107 #define	WT_CONN_CHECK_PANIC(conn)					\
108 	(F_ISSET(conn, WT_CONN_PANIC) ? WT_PANIC : 0)
109 #define	WT_SESSION_CHECK_PANIC(session)					\
110 	WT_CONN_CHECK_PANIC(S2C(session))
111 
112 /*
113  * Macros to ensure the dhandle is inserted or removed from both the
114  * main queue and the hashed queue.
115  */
116 #define	WT_CONN_DHANDLE_INSERT(conn, dhandle, bucket) do {		\
117 	WT_ASSERT(session,						\
118 	    F_ISSET(session, WT_SESSION_LOCKED_HANDLE_LIST_WRITE));	\
119 	TAILQ_INSERT_HEAD(&(conn)->dhqh, dhandle, q);			\
120 	TAILQ_INSERT_HEAD(&(conn)->dhhash[bucket], dhandle, hashq);	\
121 	++(conn)->dhandle_count;					\
122 } while (0)
123 
124 #define	WT_CONN_DHANDLE_REMOVE(conn, dhandle, bucket) do {		\
125 	WT_ASSERT(session,						\
126 	    F_ISSET(session, WT_SESSION_LOCKED_HANDLE_LIST_WRITE));	\
127 	TAILQ_REMOVE(&(conn)->dhqh, dhandle, q);			\
128 	TAILQ_REMOVE(&(conn)->dhhash[bucket], dhandle, hashq);		\
129 	--(conn)->dhandle_count;					\
130 } while (0)
131 
132 /*
133  * Macros to ensure the block is inserted or removed from both the
134  * main queue and the hashed queue.
135  */
136 #define	WT_CONN_BLOCK_INSERT(conn, block, bucket) do {			\
137 	TAILQ_INSERT_HEAD(&(conn)->blockqh, block, q);			\
138 	TAILQ_INSERT_HEAD(&(conn)->blockhash[bucket], block, hashq);	\
139 } while (0)
140 
141 #define	WT_CONN_BLOCK_REMOVE(conn, block, bucket) do {			\
142 	TAILQ_REMOVE(&(conn)->blockqh, block, q);			\
143 	TAILQ_REMOVE(&(conn)->blockhash[bucket], block, hashq);		\
144 } while (0)
145 
146 /*
147  * WT_CONNECTION_IMPL --
148  *	Implementation of WT_CONNECTION
149  */
150 struct __wt_connection_impl {
151 	WT_CONNECTION iface;
152 
153 	/* For operations without an application-supplied session */
154 	WT_SESSION_IMPL *default_session;
155 	WT_SESSION_IMPL  dummy_session;
156 
157 	const char *cfg;		/* Connection configuration */
158 
159 	WT_SPINLOCK api_lock;		/* Connection API spinlock */
160 	WT_SPINLOCK checkpoint_lock;	/* Checkpoint spinlock */
161 	WT_SPINLOCK fh_lock;		/* File handle queue spinlock */
162 	WT_SPINLOCK metadata_lock;	/* Metadata update spinlock */
163 	WT_SPINLOCK reconfig_lock;	/* Single thread reconfigure */
164 	WT_SPINLOCK schema_lock;	/* Schema operation spinlock */
165 	WT_RWLOCK table_lock;		/* Table list lock */
166 	WT_SPINLOCK turtle_lock;	/* Turtle file spinlock */
167 	WT_RWLOCK dhandle_lock;		/* Data handle list lock */
168 
169 					/* Connection queue */
170 	TAILQ_ENTRY(__wt_connection_impl) q;
171 					/* Cache pool queue */
172 	TAILQ_ENTRY(__wt_connection_impl) cpq;
173 
174 	const char *home;		/* Database home */
175 	const char *error_prefix;	/* Database error prefix */
176 	int is_new;			/* Connection created database */
177 
178 	uint16_t compat_major;		/* Compatibility major version */
179 	uint16_t compat_minor;		/* Compatibility minor version */
180 #define	WT_CONN_COMPAT_NONE	UINT16_MAX
181 	uint16_t req_max_major;		/* Compatibility maximum major */
182 	uint16_t req_max_minor;		/* Compatibility maximum minor */
183 	uint16_t req_min_major;		/* Compatibility minimum major */
184 	uint16_t req_min_minor;		/* Compatibility minimum minor */
185 
186 	WT_EXTENSION_API extension_api;	/* Extension API */
187 
188 					/* Configuration */
189 	const WT_CONFIG_ENTRY **config_entries;
190 
191 	const char *optrack_path;	/* Directory for operation logs */
192 	WT_FH *optrack_map_fh;		/* Name to id translation file. */
193 	WT_SPINLOCK optrack_map_spinlock; /* Translation file spinlock. */
194 	uintmax_t optrack_pid;		/* Cache the process ID. */
195 
196 	void  **foc;			/* Free-on-close array */
197 	size_t  foc_cnt;		/* Array entries */
198 	size_t  foc_size;		/* Array size */
199 
200 	WT_FH *lock_fh;			/* Lock file handle */
201 
202 	/*
203 	 * The connection keeps a cache of data handles. The set of handles
204 	 * can grow quite large so we maintain both a simple list and a hash
205 	 * table of lists. The hash table key is based on a hash of the table
206 	 * URI.
207 	 */
208 					/* Locked: data handle hash array */
209 	TAILQ_HEAD(__wt_dhhash, __wt_data_handle) dhhash[WT_HASH_ARRAY_SIZE];
210 					/* Locked: data handle list */
211 	TAILQ_HEAD(__wt_dhandle_qh, __wt_data_handle) dhqh;
212 					/* Locked: LSM handle list. */
213 	TAILQ_HEAD(__wt_lsm_qh, __wt_lsm_tree) lsmqh;
214 					/* Locked: file list */
215 	TAILQ_HEAD(__wt_fhhash, __wt_fh) fhhash[WT_HASH_ARRAY_SIZE];
216 	TAILQ_HEAD(__wt_fh_qh, __wt_fh) fhqh;
217 					/* Locked: library list */
218 	TAILQ_HEAD(__wt_dlh_qh, __wt_dlh) dlhqh;
219 
220 	WT_SPINLOCK block_lock;		/* Locked: block manager list */
221 	TAILQ_HEAD(__wt_blockhash, __wt_block) blockhash[WT_HASH_ARRAY_SIZE];
222 	TAILQ_HEAD(__wt_block_qh, __wt_block) blockqh;
223 
224 	u_int dhandle_count;		/* Locked: handles in the queue */
225 	u_int open_btree_count;		/* Locked: open writable btree count */
226 	uint32_t next_file_id;		/* Locked: file ID counter */
227 	uint32_t open_file_count;	/* Atomic: open file handle count */
228 	uint32_t open_cursor_count;	/* Atomic: open cursor handle count */
229 
230 	/*
231 	 * WiredTiger allocates space for 50 simultaneous sessions (threads of
232 	 * control) by default.  Growing the number of threads dynamically is
233 	 * possible, but tricky since server threads are walking the array
234 	 * without locking it.
235 	 *
236 	 * There's an array of WT_SESSION_IMPL pointers that reference the
237 	 * allocated array; we do it that way because we want an easy way for
238 	 * the server thread code to avoid walking the entire array when only a
239 	 * few threads are running.
240 	 */
241 	WT_SESSION_IMPL	*sessions;	/* Session reference */
242 	uint32_t	 session_size;	/* Session array size */
243 	uint32_t	 session_cnt;	/* Session count */
244 
245 	size_t     session_scratch_max;	/* Max scratch memory per session */
246 
247 	WT_CACHE  *cache;		/* Page cache */
248 	volatile uint64_t cache_size;	/* Cache size (either statically
249 					   configured or the current size
250 					   within a cache pool). */
251 
252 	WT_TXN_GLOBAL txn_global;	/* Global transaction state */
253 
254 	WT_RWLOCK hot_backup_lock;	/* Hot backup serialization */
255 	bool hot_backup;		/* Hot backup in progress */
256 	char **hot_backup_list;		/* Hot backup file list */
257 
258 	WT_SESSION_IMPL *ckpt_session;	/* Checkpoint thread session */
259 	wt_thread_t	 ckpt_tid;	/* Checkpoint thread */
260 	bool		 ckpt_tid_set;	/* Checkpoint thread set */
261 	WT_CONDVAR	*ckpt_cond;	/* Checkpoint wait mutex */
262 #define	WT_CKPT_LOGSIZE(conn)	((conn)->ckpt_logsize != 0)
263 	wt_off_t	 ckpt_logsize;	/* Checkpoint log size period */
264 	bool		 ckpt_signalled;/* Checkpoint signalled */
265 
266 	uint64_t  ckpt_usecs;		/* Checkpoint timer */
267 	uint64_t  ckpt_time_max;	/* Checkpoint time min/max */
268 	uint64_t  ckpt_time_min;
269 	uint64_t  ckpt_time_recent;	/* Checkpoint time recent/total */
270 	uint64_t  ckpt_time_total;
271 
272 	/* Checkpoint stats and verbosity timers */
273 	struct timespec ckpt_timer_start;
274 	struct timespec ckpt_timer_scrub_end;
275 
276 	/* Checkpoint progress message data */
277 	uint64_t ckpt_progress_msg_count;
278 	uint64_t ckpt_write_bytes;
279 	uint64_t ckpt_write_pages;
280 
281 	uint32_t stat_flags;		/* Options declared in flags.py */
282 
283 					/* Connection statistics */
284 	WT_CONNECTION_STATS *stats[WT_COUNTER_SLOTS];
285 	WT_CONNECTION_STATS *stat_array;
286 
287 	WT_ASYNC	*async;		/* Async structure */
288 	bool		 async_cfg;	/* Global async configuration */
289 	uint32_t	 async_size;	/* Async op array size */
290 	uint32_t	 async_workers;	/* Number of async workers */
291 
292 	WT_LSM_MANAGER	lsm_manager;	/* LSM worker thread information */
293 
294 	WT_KEYED_ENCRYPTOR *kencryptor;	/* Encryptor for metadata and log */
295 
296 	bool		 evict_server_running;/* Eviction server operating */
297 
298 	WT_THREAD_GROUP  evict_threads;
299 	uint32_t	 evict_threads_max;/* Max eviction threads */
300 	uint32_t	 evict_threads_min;/* Min eviction threads */
301 
302 #define	WT_STATLOG_FILENAME	"WiredTigerStat.%d.%H"
303 	WT_SESSION_IMPL *stat_session;	/* Statistics log session */
304 	wt_thread_t	 stat_tid;	/* Statistics log thread */
305 	bool		 stat_tid_set;	/* Statistics log thread set */
306 	WT_CONDVAR	*stat_cond;	/* Statistics log wait mutex */
307 	const char	*stat_format;	/* Statistics log timestamp format */
308 	WT_FSTREAM	*stat_fs;	/* Statistics log stream */
309 	/* Statistics log json table printing state flag */
310 	bool		 stat_json_tables;
311 	char		*stat_path;	/* Statistics log path format */
312 	char	       **stat_sources;	/* Statistics log list of objects */
313 	const char	*stat_stamp;	/* Statistics log entry timestamp */
314 	uint64_t	 stat_usecs;	/* Statistics log period */
315 
316 /* AUTOMATIC FLAG VALUE GENERATION START */
317 #define	WT_CONN_LOG_ARCHIVE		0x001u	/* Archive is enabled */
318 #define	WT_CONN_LOG_DOWNGRADED		0x002u	/* Running older version */
319 #define	WT_CONN_LOG_ENABLED		0x004u	/* Logging is enabled */
320 #define	WT_CONN_LOG_EXISTED		0x008u	/* Log files found */
321 #define	WT_CONN_LOG_FORCE_DOWNGRADE	0x010u	/* Force downgrade */
322 #define	WT_CONN_LOG_RECOVER_DIRTY	0x020u	/* Recovering unclean */
323 #define	WT_CONN_LOG_RECOVER_DONE	0x040u	/* Recovery completed */
324 #define	WT_CONN_LOG_RECOVER_ERR		0x080u	/* Error if recovery required */
325 #define	WT_CONN_LOG_ZERO_FILL		0x100u	/* Manually zero files */
326 /* AUTOMATIC FLAG VALUE GENERATION STOP */
327 	uint32_t	 log_flags;	/* Global logging configuration */
328 	WT_CONDVAR	*log_cond;	/* Log server wait mutex */
329 	WT_SESSION_IMPL *log_session;	/* Log server session */
330 	wt_thread_t	 log_tid;	/* Log server thread */
331 	bool		 log_tid_set;	/* Log server thread set */
332 	WT_CONDVAR	*log_file_cond;	/* Log file thread wait mutex */
333 	WT_SESSION_IMPL *log_file_session;/* Log file thread session */
334 	wt_thread_t	 log_file_tid;	/* Log file thread */
335 	bool		 log_file_tid_set;/* Log file thread set */
336 	WT_CONDVAR	*log_wrlsn_cond;/* Log write lsn thread wait mutex */
337 	WT_SESSION_IMPL *log_wrlsn_session;/* Log write lsn thread session */
338 	wt_thread_t	 log_wrlsn_tid;	/* Log write lsn thread */
339 	bool		 log_wrlsn_tid_set;/* Log write lsn thread set */
340 	WT_LOG		*log;		/* Logging structure */
341 	WT_COMPRESSOR	*log_compressor;/* Logging compressor */
342 	uint32_t	 log_cursors;	/* Log cursor count */
343 	wt_off_t	 log_file_max;	/* Log file max size */
344 	const char	*log_path;	/* Logging path format */
345 	uint32_t	 log_prealloc;	/* Log file pre-allocation */
346 	uint16_t	 log_req_max;	/* Max required log version */
347 	uint16_t	 log_req_min;	/* Min required log version */
348 	uint32_t	 txn_logsync;	/* Log sync configuration */
349 
350 	WT_SESSION_IMPL *meta_ckpt_session;/* Metadata checkpoint session */
351 
352 	/*
353 	 * Is there a data/schema change that needs to be the part of a
354 	 * checkpoint.
355 	 */
356 	bool modified;
357 
358 	WT_SESSION_IMPL *sweep_session;	   /* Handle sweep session */
359 	wt_thread_t	 sweep_tid;	   /* Handle sweep thread */
360 	int		 sweep_tid_set;	   /* Handle sweep thread set */
361 	WT_CONDVAR      *sweep_cond;	   /* Handle sweep wait mutex */
362 	uint64_t         sweep_idle_time;  /* Handle sweep idle time */
363 	uint64_t         sweep_interval;   /* Handle sweep interval */
364 	uint64_t         sweep_handles_min;/* Handle sweep minimum open */
365 
366 	/* Set of btree IDs not being rolled back */
367 	uint8_t *stable_rollback_bitstring;
368 	uint32_t stable_rollback_maxfile;
369 
370 					/* Locked: collator list */
371 	TAILQ_HEAD(__wt_coll_qh, __wt_named_collator) collqh;
372 
373 					/* Locked: compressor list */
374 	TAILQ_HEAD(__wt_comp_qh, __wt_named_compressor) compqh;
375 
376 					/* Locked: data source list */
377 	TAILQ_HEAD(__wt_dsrc_qh, __wt_named_data_source) dsrcqh;
378 
379 					/* Locked: encryptor list */
380 	WT_SPINLOCK encryptor_lock;	/* Encryptor list lock */
381 	TAILQ_HEAD(__wt_encrypt_qh, __wt_named_encryptor) encryptqh;
382 
383 					/* Locked: extractor list */
384 	TAILQ_HEAD(__wt_extractor_qh, __wt_named_extractor) extractorqh;
385 
386 	void	*lang_private;		/* Language specific private storage */
387 
388 	/* If non-zero, all buffers used for I/O will be aligned to this. */
389 	size_t buffer_alignment;
390 
391 	uint64_t stashed_bytes;		/* Atomic: stashed memory statistics */
392 	uint64_t stashed_objects;
393 					/* Generations manager */
394 	volatile uint64_t generations[WT_GENERATIONS];
395 
396 	wt_off_t data_extend_len;	/* file_extend data length */
397 	wt_off_t log_extend_len;	/* file_extend log length */
398 
399 /* AUTOMATIC FLAG VALUE GENERATION START */
400 #define	WT_DIRECT_IO_CHECKPOINT	0x1u	/* Checkpoints */
401 #define	WT_DIRECT_IO_DATA	0x2u	/* Data files */
402 #define	WT_DIRECT_IO_LOG	0x4u	/* Log files */
403 /* AUTOMATIC FLAG VALUE GENERATION STOP */
404 	uint64_t direct_io;		/* O_DIRECT, FILE_FLAG_NO_BUFFERING */
405 	uint64_t write_through;		/* FILE_FLAG_WRITE_THROUGH */
406 
407 	bool	 mmap;			/* mmap configuration */
408 	int page_size;			/* OS page size for mmap alignment */
409 
410 /* AUTOMATIC FLAG VALUE GENERATION START */
411 #define	WT_VERB_API			0x000000001u
412 #define	WT_VERB_BLOCK			0x000000002u
413 #define	WT_VERB_CHECKPOINT		0x000000004u
414 #define	WT_VERB_CHECKPOINT_PROGRESS	0x000000008u
415 #define	WT_VERB_COMPACT			0x000000010u
416 #define	WT_VERB_ERROR_RETURNS		0x000000020u
417 #define	WT_VERB_EVICT			0x000000040u
418 #define	WT_VERB_EVICTSERVER		0x000000080u
419 #define	WT_VERB_EVICT_STUCK		0x000000100u
420 #define	WT_VERB_FILEOPS			0x000000200u
421 #define	WT_VERB_HANDLEOPS		0x000000400u
422 #define	WT_VERB_LOG			0x000000800u
423 #define	WT_VERB_LOOKASIDE		0x000001000u
424 #define	WT_VERB_LOOKASIDE_ACTIVITY	0x000002000u
425 #define	WT_VERB_LSM			0x000004000u
426 #define	WT_VERB_LSM_MANAGER		0x000008000u
427 #define	WT_VERB_METADATA		0x000010000u
428 #define	WT_VERB_MUTEX			0x000020000u
429 #define	WT_VERB_OVERFLOW		0x000040000u
430 #define	WT_VERB_READ			0x000080000u
431 #define	WT_VERB_REBALANCE		0x000100000u
432 #define	WT_VERB_RECONCILE		0x000200000u
433 #define	WT_VERB_RECOVERY		0x000400000u
434 #define	WT_VERB_RECOVERY_PROGRESS	0x000800000u
435 #define	WT_VERB_SALVAGE			0x001000000u
436 #define	WT_VERB_SHARED_CACHE		0x002000000u
437 #define	WT_VERB_SPLIT			0x004000000u
438 #define	WT_VERB_TEMPORARY		0x008000000u
439 #define	WT_VERB_THREAD_GROUP		0x010000000u
440 #define	WT_VERB_TIMESTAMP		0x020000000u
441 #define	WT_VERB_TRANSACTION		0x040000000u
442 #define	WT_VERB_VERIFY			0x080000000u
443 #define	WT_VERB_VERSION			0x100000000u
444 #define	WT_VERB_WRITE			0x200000000u
445 /* AUTOMATIC FLAG VALUE GENERATION STOP */
446 	uint64_t verbose;
447 
448 	/*
449 	 * Variable with flags for which subsystems the diagnostic stress timing
450 	 * delays have been requested.
451 	 */
452 /* AUTOMATIC FLAG VALUE GENERATION START */
453 #define	WT_TIMING_STRESS_CHECKPOINT_SLOW	0x001u
454 #define	WT_TIMING_STRESS_LOOKASIDE_SWEEP	0x002u
455 #define	WT_TIMING_STRESS_SPLIT_1		0x004u
456 #define	WT_TIMING_STRESS_SPLIT_2		0x008u
457 #define	WT_TIMING_STRESS_SPLIT_3		0x010u
458 #define	WT_TIMING_STRESS_SPLIT_4		0x020u
459 #define	WT_TIMING_STRESS_SPLIT_5		0x040u
460 #define	WT_TIMING_STRESS_SPLIT_6		0x080u
461 #define	WT_TIMING_STRESS_SPLIT_7		0x100u
462 #define	WT_TIMING_STRESS_SPLIT_8		0x200u
463 /* AUTOMATIC FLAG VALUE GENERATION STOP */
464 	uint64_t timing_stress_flags;
465 
466 #define	WT_STDERR(s)	(&S2C(s)->wt_stderr)
467 #define	WT_STDOUT(s)	(&S2C(s)->wt_stdout)
468 	WT_FSTREAM wt_stderr, wt_stdout;
469 
470 	/*
471 	 * File system interface abstracted to support alternative file system
472 	 * implementations.
473 	 */
474 	WT_FILE_SYSTEM *file_system;
475 
476 /* AUTOMATIC FLAG VALUE GENERATION START */
477 #define	WT_CONN_CACHE_CURSORS		0x0000001u
478 #define	WT_CONN_CACHE_POOL		0x0000002u
479 #define	WT_CONN_CKPT_SYNC		0x0000004u
480 #define	WT_CONN_CLOSING			0x0000008u
481 #define	WT_CONN_CLOSING_NO_MORE_OPENS	0x0000010u
482 #define	WT_CONN_CLOSING_TIMESTAMP	0x0000020u
483 #define	WT_CONN_COMPATIBILITY		0x0000040u
484 #define	WT_CONN_DATA_CORRUPTION		0x0000080u
485 #define	WT_CONN_EVICTION_NO_LOOKASIDE	0x0000100u
486 #define	WT_CONN_EVICTION_RUN		0x0000200u
487 #define	WT_CONN_IN_MEMORY		0x0000400u
488 #define	WT_CONN_LEAK_MEMORY		0x0000800u
489 #define	WT_CONN_LOOKASIDE_OPEN		0x0001000u
490 #define	WT_CONN_LSM_MERGE		0x0002000u
491 #define	WT_CONN_OPTRACK			0x0004000u
492 #define	WT_CONN_PANIC			0x0008000u
493 #define	WT_CONN_READONLY		0x0010000u
494 #define	WT_CONN_RECOVERING		0x0020000u
495 #define	WT_CONN_SALVAGE			0x0040000u
496 #define	WT_CONN_SERVER_ASYNC		0x0080000u
497 #define	WT_CONN_SERVER_CHECKPOINT	0x0100000u
498 #define	WT_CONN_SERVER_LOG		0x0200000u
499 #define	WT_CONN_SERVER_LSM		0x0400000u
500 #define	WT_CONN_SERVER_STATISTICS	0x0800000u
501 #define	WT_CONN_SERVER_SWEEP		0x1000000u
502 #define	WT_CONN_WAS_BACKUP		0x2000000u
503 /* AUTOMATIC FLAG VALUE GENERATION STOP */
504 	uint32_t flags;
505 };
506