Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-17 09:56:15

0001 /*-
0002  * Copyright (c) 2014-present MongoDB, Inc.
0003  * Copyright (c) 2008-2014 WiredTiger, Inc.
0004  *  All rights reserved.
0005  *
0006  * See the file LICENSE for redistribution information.
0007  */
0008 
0009 #ifndef __WIREDTIGER_H_
0010 #define __WIREDTIGER_H_
0011 
0012 #if defined(__cplusplus)
0013 extern "C" {
0014 #endif
0015 
0016 /*******************************************
0017  * Version information
0018  *******************************************/
0019 #define WIREDTIGER_VERSION_MAJOR    10
0020 #define WIREDTIGER_VERSION_MINOR    0
0021 #define WIREDTIGER_VERSION_PATCH    0
0022 #define WIREDTIGER_VERSION_STRING   "WiredTiger 10.0.0: (April 12, 2021)"
0023 
0024 /*******************************************
0025  * Required includes
0026  *******************************************/
0027 
0028 #include <sys/types.h>
0029 #include <inttypes.h>
0030 #include <stdarg.h>
0031 #include <stdbool.h>
0032 #include <stdint.h>
0033 #include <stdio.h>
0034 
0035 /*******************************************
0036  * Portable type names
0037  *******************************************/
0038 typedef off_t wt_off_t;
0039 
0040 
0041 
0042 #if defined(DOXYGEN) || defined(SWIG)
0043 #define __F(func) func
0044 #else
0045 /* NOLINTNEXTLINE(misc-macro-parentheses) */
0046 #define __F(func) (*func)
0047 #endif
0048 
0049 /*
0050  * We support configuring WiredTiger with the gcc/clang -fvisibility=hidden
0051  * flags, but that requires public APIs be specifically marked.
0052  */
0053 #if defined(DOXYGEN) || defined(SWIG) || !defined(__GNUC__)
0054 #define WT_ATTRIBUTE_LIBRARY_VISIBLE
0055 #else
0056 #define WT_ATTRIBUTE_LIBRARY_VISIBLE    __attribute__((visibility("default")))
0057 #endif
0058 
0059 /*!
0060  * @defgroup wt WiredTiger API
0061  * The functions, handles and methods applications use to access and manage
0062  * data with WiredTiger.
0063  *
0064  * @{
0065  */
0066 
0067 /*******************************************
0068  * Public forward structure declarations
0069  *******************************************/
0070 struct __wt_collator;       typedef struct __wt_collator WT_COLLATOR;
0071 struct __wt_compressor;     typedef struct __wt_compressor WT_COMPRESSOR;
0072 struct __wt_config_item;    typedef struct __wt_config_item WT_CONFIG_ITEM;
0073 struct __wt_config_parser;
0074     typedef struct __wt_config_parser WT_CONFIG_PARSER;
0075 struct __wt_connection;     typedef struct __wt_connection WT_CONNECTION;
0076 struct __wt_cursor;     typedef struct __wt_cursor WT_CURSOR;
0077 struct __wt_data_source;    typedef struct __wt_data_source WT_DATA_SOURCE;
0078 struct __wt_encryptor;      typedef struct __wt_encryptor WT_ENCRYPTOR;
0079 struct __wt_event_handler;  typedef struct __wt_event_handler WT_EVENT_HANDLER;
0080 struct __wt_extension_api;  typedef struct __wt_extension_api WT_EXTENSION_API;
0081 struct __wt_extractor;      typedef struct __wt_extractor WT_EXTRACTOR;
0082 struct __wt_file_handle;    typedef struct __wt_file_handle WT_FILE_HANDLE;
0083 struct __wt_file_system;    typedef struct __wt_file_system WT_FILE_SYSTEM;
0084 struct __wt_item;       typedef struct __wt_item WT_ITEM;
0085 struct __wt_modify;     typedef struct __wt_modify WT_MODIFY;
0086 struct __wt_session;        typedef struct __wt_session WT_SESSION;
0087 #if !defined(DOXYGEN)
0088 struct __wt_storage_source; typedef struct __wt_storage_source WT_STORAGE_SOURCE;
0089 #endif
0090 
0091 #if defined(SWIGJAVA)
0092 #define WT_HANDLE_NULLABLE(typename)    typename##_NULLABLE
0093 #define WT_HANDLE_CLOSED(typename)  typename##_CLOSED
0094 typedef WT_CURSOR           WT_CURSOR_NULLABLE;
0095 typedef WT_CURSOR           WT_CURSOR_CLOSED;
0096 typedef WT_SESSION          WT_SESSION_CLOSED;
0097 typedef WT_CONNECTION           WT_CONNECTION_CLOSED;
0098 #elif !defined(DOXYGEN)
0099 #define WT_HANDLE_NULLABLE(typename)    typename
0100 #define WT_HANDLE_CLOSED(typename)  typename
0101 #endif
0102 
0103 /*!
0104  * A raw item of data to be managed, including a pointer to the data and a
0105  * length.
0106  *
0107  * WT_ITEM structures do not need to be cleared before use.
0108  */
0109 struct __wt_item {
0110     /*!
0111      * The memory reference of the data item.
0112      *
0113      * For items returned by a WT_CURSOR, the pointer is only valid until
0114      * the next operation on that cursor.  Applications that need to keep
0115      * an item across multiple cursor operations must make a copy.
0116      */
0117     const void *data;
0118 
0119     /*!
0120      * The number of bytes in the data item.
0121      *
0122      * The maximum length of a single column stored in a table is not fixed
0123      * (as it partially depends on the underlying file configuration), but
0124      * is always a small number of bytes less than 4GB.
0125      */
0126     size_t size;
0127 
0128 #ifndef DOXYGEN
0129     /*! Managed memory chunk (internal use). */
0130     void *mem;
0131 
0132     /*! Managed memory size (internal use). */
0133     size_t memsize;
0134 
0135     /*! Object flags (internal use). */
0136 /* AUTOMATIC FLAG VALUE GENERATION START */
0137 #define WT_ITEM_ALIGNED 0x1u
0138 #define WT_ITEM_INUSE   0x2u
0139 /* AUTOMATIC FLAG VALUE GENERATION STOP */
0140     uint32_t flags;
0141 #endif
0142 };
0143 
0144 /*!
0145  * A set of modifications for a value, including a pointer to new data and a
0146  * length, plus a target offset in the value and an optional length of data
0147  * in the value to be replaced.
0148  *
0149  * WT_MODIFY structures do not need to be cleared before use.
0150  */
0151 struct __wt_modify {
0152     /*!
0153      * New data. The size of the new data may be zero when no new data is
0154      * provided.
0155      */
0156     WT_ITEM data;
0157 
0158     /*!
0159      * The zero-based byte offset in the value where the new data is placed.
0160      *
0161      * If the offset is past the end of the value, padding bytes are
0162      * appended to the value up to the specified offset. If the value is a
0163      * string (value format \c S), the padding byte is a space. If the value
0164      * is a raw byte array accessed using a WT_ITEM structure (value format
0165      * \c u), the padding byte is a nul.
0166      */
0167      size_t offset;
0168 
0169     /*!
0170      * The number of bytes in the value to be replaced.
0171      *
0172      * If the size is zero, no bytes from the value are replaced and the new
0173      * data is inserted.
0174      *
0175      * If the offset is past the end of the value, the size is ignored.
0176      *
0177      * If the offset plus the size overlaps the end of the previous value,
0178      * bytes from the offset to the end of the value are replaced and any
0179      * remaining new data is appended.
0180      */
0181      size_t size;
0182 };
0183 
0184 /*!
0185  * The maximum packed size of a 64-bit integer.  The ::wiredtiger_struct_pack
0186  * function will pack single long integers into at most this many bytes.
0187  */
0188 #define WT_INTPACK64_MAXSIZE    ((int)sizeof(int64_t) + 1)
0189 
0190 /*!
0191  * The maximum packed size of a 32-bit integer.  The ::wiredtiger_struct_pack
0192  * function will pack single integers into at most this many bytes.
0193  */
0194 #define WT_INTPACK32_MAXSIZE    ((int)sizeof(int32_t) + 1)
0195 
0196 /*!
0197  * A WT_CURSOR handle is the interface to a cursor.
0198  *
0199  * Cursors allow data to be searched, iterated and modified, implementing the
0200  * CRUD (create, read, update and delete) operations.  Cursors are opened in
0201  * the context of a session.  If a transaction is started, cursors operate in
0202  * the context of the transaction until the transaction is resolved.
0203  *
0204  * Raw data is represented by key/value pairs of WT_ITEM structures, but
0205  * cursors can also provide access to fields within the key and value if the
0206  * formats are described in the WT_SESSION::create method.
0207  *
0208  * In the common case, a cursor is used to access records in a table.  However,
0209  * cursors can be used on subsets of tables (such as a single column or a
0210  * projection of multiple columns), as an interface to statistics, configuration
0211  * data or application-specific data sources.  See WT_SESSION::open_cursor for
0212  * more information.
0213  *
0214  * <b>Thread safety:</b> A WT_CURSOR handle is not usually shared between
0215  * threads, see @ref threads for more information.
0216  */
0217 struct __wt_cursor {
0218     WT_SESSION *session;    /*!< The session handle for this cursor. */
0219 
0220     /*!
0221      * The name of the data source for the cursor, matches the \c uri
0222      * parameter to WT_SESSION::open_cursor used to open the cursor.
0223      */
0224     const char *uri;
0225 
0226     /*!
0227      * The format of the data packed into key items.  See @ref packing for
0228      * details.  If not set, a default value of "u" is assumed, and
0229      * applications must use WT_ITEM structures to manipulate untyped byte
0230      * arrays.
0231      */
0232     const char *key_format;
0233 
0234     /*!
0235      * The format of the data packed into value items.  See @ref packing
0236      * for details.  If not set, a default value of "u" is assumed, and
0237      * applications must use WT_ITEM structures to manipulate untyped byte
0238      * arrays.
0239      */
0240     const char *value_format;
0241 
0242     /*!
0243      * @name Data access
0244      * @{
0245      */
0246     /*!
0247      * Get the key for the current record.
0248      *
0249      * @snippet ex_all.c Get the cursor's string key
0250      *
0251      * @snippet ex_all.c Get the cursor's record number key
0252      *
0253      * @param cursor the cursor handle
0254      * @param ... pointers to hold key fields corresponding to
0255      * WT_CURSOR::key_format.
0256      * The API does not validate the argument types passed in, the caller is
0257      * responsible for passing the correct argument types according to
0258      * WT_CURSOR::key_format.
0259      * @errors
0260      */
0261     int __F(get_key)(WT_CURSOR *cursor, ...);
0262 
0263     /*!
0264      * Get the value for the current record.
0265      *
0266      * @snippet ex_all.c Get the cursor's string value
0267      *
0268      * @snippet ex_all.c Get the cursor's raw value
0269      *
0270      * @param cursor the cursor handle
0271      * @param ... pointers to hold value fields corresponding to
0272      * WT_CURSOR::value_format.
0273      * The API does not validate the argument types passed in, the caller is
0274      * responsible for passing the correct argument types according to
0275      * WT_CURSOR::value_format.
0276      * @errors
0277      */
0278     int __F(get_value)(WT_CURSOR *cursor, ...);
0279 
0280     /*!
0281      * Set the key for the next operation.
0282      *
0283      * @snippet ex_all.c Set the cursor's string key
0284      *
0285      * @snippet ex_all.c Set the cursor's record number key
0286      *
0287      * @param cursor the cursor handle
0288      * @param ... key fields corresponding to WT_CURSOR::key_format.
0289      *
0290      * If an error occurs during this operation, a flag will be set in the
0291      * cursor, and the next operation to access the key will fail.  This
0292      * simplifies error handling in applications.
0293      */
0294     void __F(set_key)(WT_CURSOR *cursor, ...);
0295 
0296     /*!
0297      * Set the value for the next operation.
0298      *
0299      * @snippet ex_all.c Set the cursor's string value
0300      *
0301      * @snippet ex_all.c Set the cursor's raw value
0302      *
0303      * @param cursor the cursor handle
0304      * @param ... value fields corresponding to WT_CURSOR::value_format.
0305      *
0306      * If an error occurs during this operation, a flag will be set in the
0307      * cursor, and the next operation to access the value will fail.  This
0308      * simplifies error handling in applications.
0309      */
0310     void __F(set_value)(WT_CURSOR *cursor, ...);
0311     /*! @} */
0312 
0313     /*!
0314      * @name Cursor positioning
0315      * @{
0316      */
0317     /*!
0318      * Return the ordering relationship between two cursors: both cursors
0319      * must have the same data source and have valid keys. (When testing
0320      * only for equality, WT_CURSOR::equals may be faster.)
0321      *
0322      * @snippet ex_all.c Cursor comparison
0323      *
0324      * @param cursor the cursor handle
0325      * @param other another cursor handle
0326      * @param comparep the status of the comparison: < 0 if
0327      * <code>cursor</code> refers to a key that appears before
0328      * <code>other</code>, 0 if the cursors refer to the same key,
0329      * and > 0 if <code>cursor</code> refers to a key that appears after
0330      * <code>other</code>.
0331      * @errors
0332      */
0333     int __F(compare)(WT_CURSOR *cursor, WT_CURSOR *other, int *comparep);
0334 
0335     /*!
0336      * Return the ordering relationship between two cursors, testing only
0337      * for equality: both cursors must have the same data source and have
0338      * valid keys.
0339      *
0340      * @snippet ex_all.c Cursor equality
0341      *
0342      * @param cursor the cursor handle
0343      * @param other another cursor handle
0344      * @param[out] equalp the status of the comparison: 1 if the cursors
0345      * refer to the same key, otherwise 0.
0346      * @errors
0347      */
0348     int __F(equals)(WT_CURSOR *cursor, WT_CURSOR *other, int *equalp);
0349 
0350     /*!
0351      * Return the next record.
0352      *
0353      * @snippet ex_all.c Return the next record
0354      *
0355      * @param cursor the cursor handle
0356      * @errors
0357      */
0358     int __F(next)(WT_CURSOR *cursor);
0359 
0360     /*!
0361      * Return the previous record.
0362      *
0363      * @snippet ex_all.c Return the previous record
0364      *
0365      * @param cursor the cursor handle
0366      * @errors
0367      */
0368     int __F(prev)(WT_CURSOR *cursor);
0369 
0370     /*!
0371      * Reset the cursor. Any resources held by the cursor are released,
0372      * and the cursor's key and position are no longer valid. Subsequent
0373      * iterations with WT_CURSOR::next will move to the first record, or
0374      * with WT_CURSOR::prev will move to the last record.
0375      *
0376      * In the case of a statistics cursor, resetting the cursor refreshes
0377      * the statistics information returned. Resetting a session statistics
0378      * cursor resets all the session statistics values to zero.
0379      *
0380      * @snippet ex_all.c Reset the cursor
0381      *
0382      * @param cursor the cursor handle
0383      * @errors
0384      */
0385     int __F(reset)(WT_CURSOR *cursor);
0386 
0387     /*!
0388      * Return the record matching the key. The key must first be set.
0389      *
0390      * @snippet ex_all.c Search for an exact match
0391      *
0392      * On success, the cursor ends positioned at the returned record; to
0393      * minimize cursor resources, the WT_CURSOR::reset method should be
0394      * called as soon as the record has been retrieved and the cursor no
0395      * longer needs that position.
0396      *
0397      * @param cursor the cursor handle
0398      * @errors
0399      */
0400     int __F(search)(WT_CURSOR *cursor);
0401 
0402     /*!
0403      * Return the record matching the key if it exists, or an adjacent
0404      * record.  An adjacent record is either the smallest record larger
0405      * than the key or the largest record smaller than the key (in other
0406      * words, a logically adjacent key).
0407      *
0408      * The key must first be set.
0409      *
0410      * An example of a search for an exact or adjacent match:
0411      *
0412      * @snippet ex_all.c Search for an exact or adjacent match
0413      *
0414      * An example of a forward scan through the table, where all keys
0415      * greater than or equal to a specified prefix are included in the
0416      * scan:
0417      *
0418      * @snippet ex_all.c Forward scan greater than or equal
0419      *
0420      * An example of a backward scan through the table, where all keys
0421      * less than a specified prefix are included in the scan:
0422      *
0423      * @snippet ex_all.c Backward scan less than
0424      *
0425      * On success, the cursor ends positioned at the returned record; to
0426      * minimize cursor resources, the WT_CURSOR::reset method should be
0427      * called as soon as the record has been retrieved and the cursor no
0428      * longer needs that position.
0429      *
0430      * @param cursor the cursor handle
0431      * @param exactp the status of the search: 0 if an exact match is
0432      * found, < 0 if a smaller key is returned, > 0 if a larger key is
0433      * returned
0434      * @errors
0435      */
0436     int __F(search_near)(WT_CURSOR *cursor, int *exactp);
0437     /*! @} */
0438 
0439     /*!
0440      * @name Data modification
0441      * @{
0442      */
0443     /*!
0444      * Insert a record and optionally update an existing record.
0445      *
0446      * If the cursor was configured with "overwrite=true" (the default),
0447      * both the key and value must be set; if the record already exists,
0448      * the key's value will be updated, otherwise, the record will be
0449      * inserted.
0450      *
0451      * @snippet ex_all.c Insert a new record or overwrite an existing record
0452      *
0453      * If the cursor was not configured with "overwrite=true", both the key
0454      * and value must be set and the record must not already exist; the
0455      * record will be inserted.
0456      *
0457      * @snippet ex_all.c Insert a new record and fail if the record exists
0458      *
0459      * If a cursor with record number keys was configured with
0460      * "append=true" (not the default), the value must be set; a new record
0461      * will be appended and the record number set as the cursor key value.
0462      *
0463      * @snippet ex_all.c Insert a new record and assign a record number
0464      *
0465      * The cursor ends with no position, and a subsequent call to the
0466      * WT_CURSOR::next (WT_CURSOR::prev) method will iterate from the
0467      * beginning (end) of the table.
0468      *
0469      * If the cursor does not have record number keys or was not configured
0470      * with "append=true", the cursor ends with no key set and a subsequent
0471      * call to the WT_CURSOR::get_key method will fail. The cursor ends with
0472      * no value set and a subsequent call to the WT_CURSOR::get_value method
0473      * will fail.
0474      *
0475      * Inserting a new record after the current maximum record in a
0476      * fixed-length bit field column-store (that is, a store with an
0477      * 'r' type key and 't' type value) may implicitly create the missing
0478      * records as records with a value of 0.
0479      *
0480      * When loading a large amount of data into a new object, using
0481      * a cursor with the \c bulk configuration string enabled and
0482      * loading the data in sorted order will be much faster than doing
0483      * out-of-order inserts.  See @ref tune_bulk_load for more information.
0484      *
0485      * The maximum length of a single column stored in a table is not fixed
0486      * (as it partially depends on the underlying file configuration), but
0487      * is always a small number of bytes less than 4GB.
0488      *
0489      * @param cursor the cursor handle
0490      * @errors
0491      * In particular, if \c overwrite=false is configured and a record with
0492      * the specified key already exists, ::WT_DUPLICATE_KEY is returned.
0493      * Also, if \c in_memory is configured for the database and the insert
0494      * requires more than the configured cache size to complete,
0495      * ::WT_CACHE_FULL is returned.
0496      */
0497     int __F(insert)(WT_CURSOR *cursor);
0498 
0499     /*!
0500      * Modify an existing record.
0501      *
0502      * Both the key and value must be set and the record must already exist;
0503      * the record will be updated.
0504      *
0505      * Modifications are specified in WT_MODIFY structures. Modifications
0506      * are applied in order and later modifications can update earlier ones.
0507      *
0508      * The modify method is only supported on strings (value format type
0509      * \c S), or raw byte arrays accessed using a WT_ITEM structure (value
0510      * format type \c u).
0511      *
0512      * The WT_CURSOR::modify method can only be called from within an
0513      * explicit transaction configured at the snapshot isolation level.
0514      *
0515      * The WT_CURSOR::modify method stores a change record in cache and
0516      * writes a change record to the log instead of the usual complete
0517      * values. Note that WT_CURSOR::modify is generally slower than the
0518      * WT_CURSOR::update method, and can result in slower reads because
0519      * the complete value must be assembled during retrieval. The
0520      * WT_CURSOR::modify method is intended for applications modifying
0521      * large records where there is cache or I/O pressure, that is,
0522      * applications that will benefit when data updates require less cache
0523      * and they write less logging information.
0524      *
0525      * @snippet ex_all.c Modify an existing record
0526      *
0527      * On success, the cursor ends positioned at the modified record; to
0528      * minimize cursor resources, the WT_CURSOR::reset method should be
0529      * called as soon as the cursor no longer needs that position.
0530      *
0531      * The maximum length of a single column stored in a table is not fixed
0532      * (as it partially depends on the underlying file configuration), but
0533      * is always a small number of bytes less than 4GB.
0534      *
0535      * @param cursor the cursor handle
0536      * @param entries an array of modification data structures
0537      * @param nentries the number of modification data structures
0538      * @errors
0539      * In particular, if \c in_memory is configured for the database and
0540      * the modify requires more than the configured cache size to complete,
0541      * ::WT_CACHE_FULL is returned.
0542      */
0543     int __F(modify)(WT_CURSOR *cursor, WT_MODIFY *entries, int nentries);
0544 
0545     /*!
0546      * Update an existing record and optionally insert a record.
0547      *
0548      * If the cursor was configured with "overwrite=true" (the default),
0549      * both the key and value must be set; if the record already exists, the
0550      * key's value will be updated, otherwise, the record will be inserted.
0551      *
0552      * @snippet ex_all.c Update an existing record or insert a new record
0553      *
0554      * If the cursor was not configured with "overwrite=true", both the key
0555      * and value must be set and the record must already exist; the
0556      * record will be updated.
0557      *
0558      * @snippet ex_all.c Update an existing record and fail if DNE
0559      *
0560      * On success, the cursor ends positioned at the modified record; to
0561      * minimize cursor resources, the WT_CURSOR::reset method should be
0562      * called as soon as the cursor no longer needs that position. (The
0563      * WT_CURSOR::insert method never keeps a cursor position and may be
0564      * more efficient for that reason.)
0565      *
0566      * The maximum length of a single column stored in a table is not fixed
0567      * (as it partially depends on the underlying file configuration), but
0568      * is always a small number of bytes less than 4GB.
0569      *
0570      * @param cursor the cursor handle
0571      * @errors
0572      * In particular, if \c overwrite=false is configured and no record with
0573      * the specified key exists, ::WT_NOTFOUND is returned.
0574      * Also, if \c in_memory is configured for the database and the update
0575      * requires more than the configured cache size to complete,
0576      * ::WT_CACHE_FULL is returned.
0577      */
0578     int __F(update)(WT_CURSOR *cursor);
0579 
0580     /*!
0581      * Remove a record.
0582      *
0583      * The key must be set; the key's record will be removed if it exists,
0584      * no error will be returned if the record does not exist.
0585      *
0586      * @snippet ex_all.c Remove a record
0587      *
0588      * Any cursor position does not change: if the cursor was positioned
0589      * before the WT_CURSOR::remove call, the cursor remains positioned
0590      * at the removed record; to minimize cursor resources, the
0591      * WT_CURSOR::reset method should be called as soon as the cursor no
0592      * longer needs that position. If the cursor was not positioned before
0593      * the WT_CURSOR::remove call, the cursor ends with no position, and a
0594      * subsequent call to the WT_CURSOR::next (WT_CURSOR::prev) method will
0595      * iterate from the beginning (end) of the table.
0596      *
0597      * @snippet ex_all.c Remove a record and fail if DNE
0598      *
0599      * Removing a record in a fixed-length bit field column-store
0600      * (that is, a store with an 'r' type key and 't' type value) is
0601      * identical to setting the record's value to 0.
0602      *
0603      * @param cursor the cursor handle
0604      * @errors
0605      */
0606     int __F(remove)(WT_CURSOR *cursor);
0607 
0608     /*!
0609      * Reserve an existing record so a subsequent write is less likely to
0610      * fail due to a conflict between concurrent operations.
0611      *
0612      * The key must first be set and the record must already exist.
0613      *
0614      * Note that reserve works by doing a special update operation that is
0615      * not logged and does not change the value of the record. This update
0616      * is aborted when the enclosing transaction ends regardless of whether
0617      * it commits or rolls back. Given that, reserve can only be used to
0618      * detect conflicts between transactions that execute concurrently. It
0619      * cannot detect all logical conflicts between transactions. For that,
0620      * some update to the record must be committed.
0621      *
0622      * @snippet ex_all.c Reserve a record
0623      *
0624      * On success, the cursor ends positioned at the specified record; to
0625      * minimize cursor resources, the WT_CURSOR::reset method should be
0626      * called as soon as the cursor no longer needs that position.
0627      *
0628      * @param cursor the cursor handle
0629      * @errors
0630      */
0631     int __F(reserve)(WT_CURSOR *cursor);
0632     /*! @} */
0633 
0634     /*!
0635      * Close the cursor.
0636      *
0637      * This releases the resources associated with the cursor handle.
0638      * Cursors are closed implicitly by ending the enclosing connection or
0639      * closing the session in which they were opened.
0640      *
0641      * @snippet ex_all.c Close the cursor
0642      *
0643      * @param cursor the cursor handle
0644      * @errors
0645      */
0646     int __F(close)(WT_HANDLE_CLOSED(WT_CURSOR) *cursor);
0647 
0648     /*!
0649      * Reconfigure the cursor.
0650      *
0651      * The cursor is reset.
0652      *
0653      * @snippet ex_all.c Reconfigure a cursor
0654      *
0655      * @param cursor the cursor handle
0656      * @configstart{WT_CURSOR.reconfigure, see dist/api_data.py}
0657      * @config{append, append the value as a new record\, creating a new record number key;
0658      * valid only for cursors with record number keys., a boolean flag; default \c false.}
0659      * @config{overwrite, configures whether the cursor's insert\, update and remove methods
0660      * check the existing state of the record.  If \c overwrite is \c false\, WT_CURSOR::insert
0661      * fails with ::WT_DUPLICATE_KEY if the record exists\, WT_CURSOR::update fails with
0662      * ::WT_NOTFOUND if the record does not exist., a boolean flag; default \c true.}
0663      * @configend
0664      * @errors
0665      */
0666     int __F(reconfigure)(WT_CURSOR *cursor, const char *config);
0667 
0668     /*
0669      * Protected fields, only to be used by cursor implementations.
0670      */
0671 #if !defined(SWIG) && !defined(DOXYGEN)
0672     int __F(cache)(WT_CURSOR *cursor);  /* Cache the cursor */
0673                         /* Reopen a cached cursor */
0674     int __F(reopen)(WT_CURSOR *cursor, bool check_only);
0675 
0676     uint64_t uri_hash;          /* Hash of URI */
0677 
0678     /*
0679      * !!!
0680      * Explicit representations of structures from queue.h.
0681      * TAILQ_ENTRY(wt_cursor) q;
0682      */
0683     struct {
0684         WT_CURSOR *tqe_next;
0685         WT_CURSOR **tqe_prev;
0686     } q;                /* Linked list of WT_CURSORs. */
0687 
0688     uint64_t recno;         /* Record number, normal and raw mode */
0689     uint8_t raw_recno_buf[WT_INTPACK64_MAXSIZE];
0690 
0691     void    *json_private;      /* JSON specific storage */
0692     void    *lang_private;      /* Language specific private storage */
0693 
0694     WT_ITEM key, value;
0695     int saved_err;          /* Saved error in set_{key,value}. */
0696     /*
0697      * URI used internally, may differ from the URI provided by the
0698      * user on open.
0699      */
0700     const char *internal_uri;
0701 
0702 /* AUTOMATIC FLAG VALUE GENERATION START */
0703 #define WT_CURSTD_APPEND        0x0000001u
0704 #define WT_CURSTD_BULK          0x0000002u
0705 #define WT_CURSTD_CACHEABLE     0x0000004u
0706 #define WT_CURSTD_CACHED        0x0000008u
0707 #define WT_CURSTD_DEAD          0x0000010u
0708 #define WT_CURSTD_DEBUG_COPY_KEY    0x0000020u
0709 #define WT_CURSTD_DEBUG_COPY_VALUE  0x0000040u
0710 #define WT_CURSTD_DEBUG_RESET_EVICT 0x0000080u
0711 #define WT_CURSTD_DUMP_HEX      0x0000100u
0712 #define WT_CURSTD_DUMP_JSON     0x0000200u
0713 #define WT_CURSTD_DUMP_PRETTY       0x0000400u
0714 #define WT_CURSTD_DUMP_PRINT        0x0000800u
0715 #define WT_CURSTD_HS_READ_ALL   0x0001000u
0716 #define WT_CURSTD_HS_READ_COMMITTED 0x0002000u
0717 #define WT_CURSTD_IGNORE_TOMBSTONE  0x0004000u
0718 #define WT_CURSTD_JOINED        0x0008000u
0719 #define WT_CURSTD_KEY_EXT       0x0010000u  /* Key points out of tree. */
0720 #define WT_CURSTD_KEY_INT       0x0020000u  /* Key points into tree. */
0721 #define WT_CURSTD_META_INUSE        0x0040000u
0722 #define WT_CURSTD_OPEN          0x0080000u
0723 #define WT_CURSTD_OVERWRITE     0x0100000u
0724 #define WT_CURSTD_RAW           0x0200000u
0725 #define WT_CURSTD_RAW_SEARCH        0x0400000u
0726 #define WT_CURSTD_UPDATE_LOCAL      0x0800000u
0727 #define WT_CURSTD_VALUE_EXT     0x1000000u  /* Value points out of tree. */
0728 #define WT_CURSTD_VALUE_INT     0x2000000u  /* Value points into tree. */
0729 /* AUTOMATIC FLAG VALUE GENERATION STOP */
0730 #define WT_CURSTD_KEY_SET   (WT_CURSTD_KEY_EXT | WT_CURSTD_KEY_INT)
0731 #define WT_CURSTD_VALUE_SET (WT_CURSTD_VALUE_EXT | WT_CURSTD_VALUE_INT)
0732     uint32_t flags;
0733 #endif
0734 };
0735 
0736 /*!
0737  * All data operations are performed in the context of a WT_SESSION.  This
0738  * encapsulates the thread and transactional context of the operation.
0739  *
0740  * <b>Thread safety:</b> A WT_SESSION handle is not usually shared between
0741  * threads, see @ref threads for more information.
0742  */
0743 struct __wt_session {
0744     /*! The connection for this session. */
0745     WT_CONNECTION *connection;
0746 
0747     /*
0748      * Don't expose app_private to non-C language bindings - they have
0749      * their own way to attach data to an operation.
0750      */
0751 #if !defined(SWIG)
0752     /*!
0753      * A location for applications to store information that will be
0754      * available in callbacks taking a WT_SESSION handle.
0755      */
0756     void *app_private;
0757 #endif
0758 
0759     /*!
0760      * Close the session handle.
0761      *
0762      * This will release the resources associated with the session handle,
0763      * including rolling back any active transactions and closing any
0764      * cursors that remain open in the session.
0765      *
0766      * @snippet ex_all.c Close a session
0767      *
0768      * @param session the session handle
0769      * @configempty{WT_SESSION.close, see dist/api_data.py}
0770      * @errors
0771      */
0772     int __F(close)(WT_HANDLE_CLOSED(WT_SESSION) *session,
0773         const char *config);
0774 
0775     /*!
0776      * Reconfigure a session handle.
0777      *
0778      * @snippet ex_all.c Reconfigure a session
0779      *
0780      * WT_SESSION::reconfigure will fail if a transaction is in progress
0781      * in the session.
0782      *
0783      * All cursors are reset.
0784      *
0785      * @param session the session handle
0786      * @configstart{WT_SESSION.reconfigure, see dist/api_data.py}
0787      * @config{cache_cursors, enable caching of cursors for reuse.  Any calls to
0788      * WT_CURSOR::close for a cursor created in this session will mark the cursor as cached and
0789      * keep it available to be reused for later calls to WT_SESSION::open_cursor.  Cached
0790      * cursors may be eventually closed.  This value is inherited from ::wiredtiger_open \c
0791      * cache_cursors., a boolean flag; default \c true.}
0792      * @config{ignore_cache_size, when set\, operations performed by this session ignore the
0793      * cache size and are not blocked when the cache is full.  Note that use of this option for
0794      * operations that create cache pressure can starve ordinary sessions that obey the cache
0795      * size., a boolean flag; default \c false.}
0796      * @config{isolation, the default isolation level for operations in this session., a
0797      * string\, chosen from the following options: \c "read-uncommitted"\, \c "read-committed"\,
0798      * \c "snapshot"; default \c snapshot.}
0799      * @configend
0800      * @errors
0801      */
0802     int __F(reconfigure)(WT_SESSION *session, const char *config);
0803 
0804 #ifndef DOXYGEN
0805     /*!
0806      * Initiate a single operation to manage tiered storage.
0807      *
0808      * @param session the session handle
0809      * @configstart{WT_SESSION.flush_tier, see dist/api_data.py}
0810      * @config{flush_timestamp, flush objects to all storage sources using the specified
0811      * timestamp.  The supplied value must not be older than the current oldest timestamp and it
0812      * must not be newer than the stable timestamp., a string; default empty.}
0813      * @config{force, force sharing of all data., a boolean flag; default \c false.}
0814      * @configend
0815      * @errors
0816      */
0817     int __F(flush_tier)(WT_SESSION *session, const char *config);
0818 #endif
0819 
0820     /*!
0821      * Return information about an error as a string.
0822      *
0823      * @snippet ex_all.c Display an error thread safe
0824      *
0825      * @param session the session handle
0826      * @param error a return value from a WiredTiger, ISO C, or POSIX
0827      * standard API
0828      * @returns a string representation of the error
0829      */
0830     const char *__F(strerror)(WT_SESSION *session, int error);
0831 
0832     /*!
0833      * @name Cursor handles
0834      * @{
0835      */
0836 
0837     /*!
0838      * Open a new cursor on a data source or duplicate an existing cursor.
0839      *
0840      * @snippet ex_all.c Open a cursor
0841      *
0842      * An existing cursor can be duplicated by passing it as the \c to_dup
0843      * parameter and setting the \c uri parameter to \c NULL:
0844      *
0845      * @snippet ex_all.c Duplicate a cursor
0846      *
0847      * Cursors being duplicated must have a key set, and successfully
0848      * duplicated cursors are positioned at the same place in the data
0849      * source as the original.
0850      *
0851      * Cursor handles should be discarded by calling WT_CURSOR::close.
0852      *
0853      * Cursors capable of supporting transactional operations operate in the
0854      * context of the current transaction, if any.
0855      *
0856      * WT_SESSION::rollback_transaction implicitly resets all cursors.
0857      *
0858      * Cursors are relatively light-weight objects but may hold references
0859      * to heavier-weight objects; applications should re-use cursors when
0860      * possible, but instantiating new cursors is not so expensive that
0861      * applications need to cache cursors at all cost.
0862      *
0863      * @param session the session handle
0864      * @param uri the data source on which the cursor operates; cursors
0865      *  are usually opened on tables, however, cursors can be opened on
0866      *  any data source, regardless of whether it is ultimately stored
0867      *  in a table.  Some cursor types may have limited functionality
0868      *  (for example, they may be read-only or not support transactional
0869      *  updates).  See @ref data_sources for more information.
0870      *  <br>
0871      *  @copydoc doc_cursor_types
0872      * @param to_dup a cursor to duplicate or gather statistics on
0873      * @configstart{WT_SESSION.open_cursor, see dist/api_data.py}
0874      * @config{append, append the value as a new record\, creating a new record number key;
0875      * valid only for cursors with record number keys., a boolean flag; default \c false.}
0876      * @config{bulk, configure the cursor for bulk-loading\, a fast\, initial load path (see
0877      * @ref tune_bulk_load for more information). Bulk-load may only be used for newly created
0878      * objects and applications should use the WT_CURSOR::insert method to insert rows.  When
0879      * bulk-loading\, rows must be loaded in sorted order.  The value is usually a true/false
0880      * flag; when bulk-loading fixed-length column store objects\, the special value \c bitmap
0881      * allows chunks of a memory resident bitmap to be loaded directly into a file by passing a
0882      * \c WT_ITEM to WT_CURSOR::set_value where the \c size field indicates the number of
0883      * records in the bitmap (as specified by the object's \c value_format configuration).
0884      * Bulk-loaded bitmap values must end on a byte boundary relative to the bit count (except
0885      * for the last set of values loaded)., a string; default \c false.}
0886      * @config{checkpoint, the name of a checkpoint to open (the reserved name
0887      * "WiredTigerCheckpoint" opens the most recent internal checkpoint taken for the object).
0888      * The cursor does not support data modification., a string; default empty.}
0889      * @config{debug = (, configure debug specific behavior on a cursor.  Generally only used
0890      * for internal testing purposes., a set of related configuration options defined below.}
0891      * @config{&nbsp;&nbsp;&nbsp;&nbsp;release_evict, Configure the cursor to evict the page
0892      * positioned on when the reset API is used., a boolean flag; default \c false.}
0893      * @config{
0894      * ),,}
0895      * @config{dump, configure the cursor for dump format inputs and outputs: "hex" selects a
0896      * simple hexadecimal format\, "json" selects a JSON format with each record formatted as
0897      * fields named by column names if available\, "pretty" selects a human-readable format
0898      * (making it incompatible with the "load") and "print" selects a format where only
0899      * non-printing characters are hexadecimal encoded.  These formats are compatible with the
0900      * @ref util_dump and @ref util_load commands., a string\, chosen from the following
0901      * options: \c "hex"\, \c "json"\, \c "pretty"\, \c "print"; default empty.}
0902      * @config{incremental = (, configure the cursor for block incremental backup usage.  These
0903      * formats are only compatible with the backup data source; see @ref backup., a set of
0904      * related configuration options defined below.}
0905      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
0906      * consolidate, causes block incremental backup information to be consolidated if adjacent
0907      * granularity blocks are modified.  If false\, information will be returned in granularity
0908      * sized blocks only.  This must be set on the primary backup cursor and it applies to all
0909      * files for this backup., a boolean flag; default \c false.}
0910      * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, whether to configure this backup as the starting
0911      * point for a subsequent incremental backup., a boolean flag; default \c false.}
0912      * @config{&nbsp;&nbsp;&nbsp;&nbsp;file, the file name when opening a duplicate incremental
0913      * backup cursor.  That duplicate cursor will return the block modifications relevant to the
0914      * given file name., a string; default empty.}
0915      * @config{&nbsp;&nbsp;&nbsp;&nbsp;force_stop,
0916      * causes all block incremental backup information to be released.  This is on an
0917      * open_cursor call and the resources will be released when this cursor is closed.  No other
0918      * operations should be done on this open cursor., a boolean flag; default \c false.}
0919      * @config{&nbsp;&nbsp;&nbsp;&nbsp;granularity, this setting manages the granularity of how
0920      * WiredTiger maintains modification maps internally.  The larger the granularity\, the
0921      * smaller amount of information WiredTiger need to maintain., an integer between 4KB and
0922      * 2GB; default \c 16MB.}
0923      * @config{&nbsp;&nbsp;&nbsp;&nbsp;src_id, a string that identifies a
0924      * previous checkpoint backup source as the source of this incremental backup.  This
0925      * identifier must have already been created by use of the 'this_id' configuration in an
0926      * earlier backup.  A source id is required to begin an incremental backup., a string;
0927      * default empty.}
0928      * @config{&nbsp;&nbsp;&nbsp;&nbsp;this_id, a string that identifies the
0929      * current system state as a future backup source for an incremental backup via 'src_id'.
0930      * This identifier is required when opening an incremental backup cursor and an error will
0931      * be returned if one is not provided., a string; default empty.}
0932      * @config{ ),,}
0933      * @config{next_random, configure the cursor to return a pseudo-random record from the
0934      * object when the WT_CURSOR::next method is called; valid only for row-store cursors.  See
0935      * @ref cursor_random for details., a boolean flag; default \c false.}
0936      * @config{next_random_sample_size, cursors configured by \c next_random to return
0937      * pseudo-random records from the object randomly select from the entire object\, by
0938      * default.  Setting \c next_random_sample_size to a non-zero value sets the number of
0939      * samples the application expects to take using the \c next_random cursor.  A cursor
0940      * configured with both \c next_random and \c next_random_sample_size attempts to divide the
0941      * object into \c next_random_sample_size equal-sized pieces\, and each retrieval returns a
0942      * record from one of those pieces.  See @ref cursor_random for details., a string; default
0943      * \c 0.}
0944      * @config{overwrite, configures whether the cursor's insert\, update and remove methods
0945      * check the existing state of the record.  If \c overwrite is \c false\, WT_CURSOR::insert
0946      * fails with ::WT_DUPLICATE_KEY if the record exists\, WT_CURSOR::update fails with
0947      * ::WT_NOTFOUND if the record does not exist., a boolean flag; default \c true.}
0948      * @config{raw, ignore the encodings for the key and value\, manage data as if the formats
0949      * were \c "u". See @ref cursor_raw for details., a boolean flag; default \c false.}
0950      * @config{read_once, results that are brought into cache from disk by this cursor will be
0951      * given less priority in the cache., a boolean flag; default \c false.}
0952      * @config{readonly, only query operations are supported by this cursor.  An error is
0953      * returned if a modification is attempted using the cursor.  The default is false for all
0954      * cursor types except for metadata cursors., a boolean flag; default \c false.}
0955      * @config{statistics, Specify the statistics to be gathered.  Choosing "all" gathers
0956      * statistics regardless of cost and may include traversing on-disk files; "fast" gathers a
0957      * subset of relatively inexpensive statistics.  The selection must agree with the database
0958      * \c statistics configuration specified to ::wiredtiger_open or WT_CONNECTION::reconfigure.
0959      * For example\, "all" or "fast" can be configured when the database is configured with
0960      * "all"\, but the cursor open will fail if "all" is specified when the database is
0961      * configured with "fast"\, and the cursor open will fail in all cases when the database is
0962      * configured with "none". If "size" is configured\, only the underlying size of the object
0963      * on disk is filled in and the object is not opened.  If \c statistics is not configured\,
0964      * the default configuration is the database configuration.  The "clear" configuration
0965      * resets statistics after gathering them\, where appropriate (for example\, a cache size
0966      * statistic is not cleared\, while the count of cursor insert operations will be cleared).
0967      * See @ref statistics for more information., a list\, with values chosen from the following
0968      * options: \c "all"\, \c "cache_walk"\, \c "fast"\, \c "clear"\, \c "size"\, \c
0969      * "tree_walk"; default empty.}
0970      * @config{target, if non-empty\, backup the list of objects; valid only for a backup data
0971      * source., a list of strings; default empty.}
0972      * @configend
0973      * @param[out] cursorp a pointer to the newly opened cursor
0974      * @errors
0975      */
0976     int __F(open_cursor)(WT_SESSION *session,
0977         const char *uri, WT_HANDLE_NULLABLE(WT_CURSOR) *to_dup,
0978         const char *config, WT_CURSOR **cursorp);
0979     /*! @} */
0980 
0981     /*!
0982      * @name Table operations
0983      * @{
0984      */
0985     /*!
0986      * Alter a table.
0987      *
0988      * This will allow modification of some table settings after
0989      * creation.
0990      *
0991      * @exclusive
0992      *
0993      * @snippet ex_all.c Alter a table
0994      *
0995      * @param session the session handle
0996      * @param name the URI of the object to alter, such as \c "table:stock"
0997      * @configstart{WT_SESSION.alter, see dist/api_data.py}
0998      * @config{access_pattern_hint, It is recommended that workloads that consist primarily of
0999      * updates and/or point queries specify \c random.  Workloads that do many cursor scans
1000      * through large ranges of data specify \c sequential and other workloads specify \c none.
1001      * The option leads to an advisory call to an appropriate operating system API where
1002      * available., a string\, chosen from the following options: \c "none"\, \c "random"\, \c
1003      * "sequential"; default \c none.}
1004      * @config{app_metadata, application-owned metadata for this object., a string; default
1005      * empty.}
1006      * @config{cache_resident, do not ever evict the object's pages from cache.  Not compatible
1007      * with LSM tables; see @ref tuning_cache_resident for more information., a boolean flag;
1008      * default \c false.}
1009      * @config{log = (, the transaction log configuration for this object.  Only valid if log is
1010      * enabled in ::wiredtiger_open., a set of related configuration options defined below.}
1011      * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, if false\, this object has checkpoint-level
1012      * durability., a boolean flag; default \c true.}
1013      * @config{ ),,}
1014      * @config{os_cache_dirty_max, maximum dirty system buffer cache usage\, in bytes.  If
1015      * non-zero\, schedule writes for dirty blocks belonging to this object in the system buffer
1016      * cache after that many bytes from this object are written into the buffer cache., an
1017      * integer greater than or equal to 0; default \c 0.}
1018      * @config{os_cache_max, maximum system buffer cache usage\, in bytes.  If non-zero\, evict
1019      * object blocks from the system buffer cache after that many bytes from this object are
1020      * read or written into the buffer cache., an integer greater than or equal to 0; default \c
1021      * 0.}
1022      * @config{readonly, the file is read-only.  All methods that may modify a file are
1023      * disabled.  See @ref readonly for more information., a boolean flag; default \c false.}
1024      * @config{verbose, enable messages for various events.  Options are given as a list\, such
1025      * as <code>"verbose=[write_timestamp]"</code>., a list\, with values chosen from the
1026      * following options: \c "write_timestamp"; default \c [].}
1027      * @config{write_timestamp_usage, describe how timestamps are expected to be used on
1028      * modifications to the table.  This option should be used in conjunction with the
1029      * corresponding \c write_timestamp configuration under the \c assert and \c verbose options
1030      * to provide logging and assertions for incorrect timestamp usage.  The choices are \c
1031      * always which ensures a timestamp is used for every operation on a table\, \c
1032      * key_consistent to ensure that once timestamps are used for a key\, they are always used\,
1033      * \c ordered is like \c key_consistent except it also enforces that subsequent updates to
1034      * each key must use increasing timestamps\, \c mixed_mode is like \c ordered except that
1035      * updates with no timestamp are allowed and have the effect of resetting the chain of
1036      * updates once the transaction ID based snapshot is no longer relevant\, \c never enforces
1037      * that timestamps are never used for a table and \c none does not enforce any expectation
1038      * on timestamp usage meaning that no log message or assertions will be produced regardless
1039      * of the corresponding \c assert and \c verbose settings., a string\, chosen from the
1040      * following options: \c "always"\, \c "key_consistent"\, \c "mixed_mode"\, \c "never"\, \c
1041      * "none"\, \c "ordered"; default \c none.}
1042      * @configend
1043      * @errors
1044      */
1045     int __F(alter)(WT_SESSION *session,
1046         const char *name, const char *config);
1047 
1048     /*!
1049      * Create a table, column group, index or file.
1050      *
1051      * @not_transactional
1052      *
1053      * @snippet ex_all.c Create a table
1054      *
1055      * @param session the session handle
1056      * @param name the URI of the object to create, such as
1057      * \c "table:stock". For a description of URI formats
1058      * see @ref data_sources.
1059      * @configstart{WT_SESSION.create, see dist/api_data.py}
1060      * @config{access_pattern_hint, It is recommended that workloads that consist primarily of
1061      * updates and/or point queries specify \c random.  Workloads that do many cursor scans
1062      * through large ranges of data specify \c sequential and other workloads specify \c none.
1063      * The option leads to an advisory call to an appropriate operating system API where
1064      * available., a string\, chosen from the following options: \c "none"\, \c "random"\, \c
1065      * "sequential"; default \c none.}
1066      * @config{allocation_size, the file unit allocation size\, in bytes\, must a power-of-two;
1067      * smaller values decrease the file space required by overflow items\, and the default value
1068      * of 4KB is a good choice absent requirements from the operating system or storage device.,
1069      * an integer between 512B and 128MB; default \c 4KB.}
1070      * @config{app_metadata, application-owned metadata for this object., a string; default
1071      * empty.}
1072      * @config{block_allocation, configure block allocation.  Permitted values are \c "best" or
1073      * \c "first"; the \c "best" configuration uses a best-fit algorithm\, the \c "first"
1074      * configuration uses a first-available algorithm during block allocation\, the \c
1075      * "log-structure" configuration allocates a new file for each checkpoint., a string\,
1076      * chosen from the following options: \c "best"\, \c "first"\, \c "log-structured"; default
1077      * \c best.}
1078      * @config{block_compressor, configure a compressor for file blocks.  Permitted values are
1079      * \c "none" or custom compression engine name created with WT_CONNECTION::add_compressor.
1080      * If WiredTiger has builtin support for \c "lz4"\, \c "snappy"\, \c "zlib" or \c "zstd"
1081      * compression\, these names are also available.  See @ref compression for more
1082      * information., a string; default \c none.}
1083      * @config{cache_resident, do not ever evict the object's pages from cache.  Not compatible
1084      * with LSM tables; see @ref tuning_cache_resident for more information., a boolean flag;
1085      * default \c false.}
1086      * @config{checksum, configure block checksums; permitted values are <code>on</code>
1087      * (checksum all blocks)\, <code>off</code> (checksum no blocks) and
1088      * <code>uncompresssed</code> (checksum only blocks which are not compressed for any
1089      * reason). The \c uncompressed setting is for applications which can rely on decompression
1090      * to fail if a block has been corrupted., a string\, chosen from the following options: \c
1091      * "on"\, \c "off"\, \c "uncompressed"; default \c uncompressed.}
1092      * @config{colgroups, comma-separated list of names of column groups.  Each column group is
1093      * stored separately\, keyed by the primary key of the table.  If no column groups are
1094      * specified\, all columns are stored together in a single file.  All value columns in the
1095      * table must appear in at least one column group.  Each column group must be created with a
1096      * separate call to WT_SESSION::create., a list of strings; default empty.}
1097      * @config{collator, configure custom collation for keys.  Permitted values are \c "none" or
1098      * a custom collator name created with WT_CONNECTION::add_collator., a string; default \c
1099      * none.}
1100      * @config{columns, list of the column names.  Comma-separated list of the form
1101      * <code>(column[\,...])</code>. For tables\, the number of entries must match the total
1102      * number of values in \c key_format and \c value_format.  For colgroups and indices\, all
1103      * column names must appear in the list of columns for the table., a list of strings;
1104      * default empty.}
1105      * @config{dictionary, the maximum number of unique values remembered in the Btree row-store
1106      * leaf page value dictionary; see @ref file_formats_compression for more information., an
1107      * integer greater than or equal to 0; default \c 0.}
1108      * @config{encryption = (, configure an encryptor for file blocks.  When a table is
1109      * created\, its encryptor is not implicitly used for any related indices or column groups.,
1110      * a set of related configuration options defined below.}
1111      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
1112      * keyid, An identifier that identifies a unique instance of the encryptor.  It is stored in
1113      * clear text\, and thus is available when the wiredtiger database is reopened.  On the
1114      * first use of a (name\, keyid) combination\, the WT_ENCRYPTOR::customize function is
1115      * called with the keyid as an argument., a string; default empty.}
1116      * @config{&nbsp;&nbsp;&nbsp;&nbsp;name, Permitted values are \c "none" or custom encryption
1117      * engine name created with WT_CONNECTION::add_encryptor.  See @ref encryption for more
1118      * information., a string; default \c none.}
1119      * @config{ ),,}
1120      * @config{exclusive, fail if the object exists.  When false (the default)\, if the object
1121      * exists\, check that its settings match the specified configuration., a boolean flag;
1122      * default \c false.}
1123      * @config{extractor, configure custom extractor for indices.  Permitted values are \c
1124      * "none" or an extractor name created with WT_CONNECTION::add_extractor., a string; default
1125      * \c none.}
1126      * @config{format, the file format., a string\, chosen from the following options: \c
1127      * "btree"; default \c btree.}
1128      * @config{huffman_key, This option is no longer supported.  Retained for backward
1129      * compatibility.  See @ref huffman for more information., a string; default \c none.}
1130      * @config{huffman_value, configure Huffman encoding for values.  Permitted values are \c
1131      * "none"\, \c "english"\, \c "utf8<file>" or \c "utf16<file>". See @ref huffman for more
1132      * information., a string; default \c none.}
1133      * @config{ignore_in_memory_cache_size, allow update and insert operations to proceed even
1134      * if the cache is already at capacity.  Only valid in conjunction with in-memory databases.
1135      * Should be used with caution - this configuration allows WiredTiger to consume memory over
1136      * the configured cache limit., a boolean flag; default \c false.}
1137      * @config{immutable, configure the index to be immutable - that is an index is not changed
1138      * by any update to a record in the table., a boolean flag; default \c false.}
1139      * @config{import = (, configure import of an existing object into the currently running
1140      * database., a set of related configuration options defined below.}
1141      * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, whether to import the input URI from disk., a
1142      * boolean flag; default \c false.}
1143      * @config{&nbsp;&nbsp;&nbsp;&nbsp;file_metadata, the file
1144      * configuration extracted from the metadata of the export database., a string; default
1145      * empty.}
1146      * @config{&nbsp;&nbsp;&nbsp;&nbsp;repair, whether to reconstruct the metadata from
1147      * the raw file content., a boolean flag; default \c false.}
1148      * @config{ ),,}
1149      * @config{internal_key_max, the largest key stored in an internal node\, in bytes.  If
1150      * set\, keys larger than the specified size are stored as overflow items (which may require
1151      * additional I/O to access). The default and the maximum allowed value are both one-tenth
1152      * the size of a newly split internal page., an integer greater than or equal to 0; default
1153      * \c 0.}
1154      * @config{internal_key_truncate, configure internal key truncation\, discarding unnecessary
1155      * trailing bytes on internal keys (ignored for custom collators)., a boolean flag; default
1156      * \c true.}
1157      * @config{internal_page_max, the maximum page size for internal nodes\, in bytes; the size
1158      * must be a multiple of the allocation size and is significant for applications wanting to
1159      * avoid excessive L2 cache misses while searching the tree.  The page maximum is the bytes
1160      * of uncompressed data\, that is\, the limit is applied before any block compression is
1161      * done., an integer between 512B and 512MB; default \c 4KB.}
1162      * @config{key_format, the format of the data packed into key items.  See @ref
1163      * schema_format_types for details.  By default\, the key_format is \c 'u' and applications
1164      * use WT_ITEM structures to manipulate raw byte arrays.  By default\, records are stored in
1165      * row-store files: keys of type \c 'r' are record numbers and records referenced by record
1166      * number are stored in column-store files., a format string; default \c u.}
1167      * @config{leaf_key_max, the largest key stored in a leaf node\, in bytes.  If set\, keys
1168      * larger than the specified size are stored as overflow items (which may require additional
1169      * I/O to access). The default value is one-tenth the size of a newly split leaf page., an
1170      * integer greater than or equal to 0; default \c 0.}
1171      * @config{leaf_page_max, the maximum page size for leaf nodes\, in bytes; the size must be
1172      * a multiple of the allocation size\, and is significant for applications wanting to
1173      * maximize sequential data transfer from a storage device.  The page maximum is the bytes
1174      * of uncompressed data\, that is\, the limit is applied before any block compression is
1175      * done., an integer between 512B and 512MB; default \c 32KB.}
1176      * @config{leaf_value_max, the largest value stored in a leaf node\, in bytes.  If set\,
1177      * values larger than the specified size are stored as overflow items (which may require
1178      * additional I/O to access). If the size is larger than the maximum leaf page size\, the
1179      * page size is temporarily ignored when large values are written.  The default is one-half
1180      * the size of a newly split leaf page., an integer greater than or equal to 0; default \c
1181      * 0.}
1182      * @config{log = (, the transaction log configuration for this object.  Only valid if log is
1183      * enabled in ::wiredtiger_open., a set of related configuration options defined below.}
1184      * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, if false\, this object has checkpoint-level
1185      * durability., a boolean flag; default \c true.}
1186      * @config{ ),,}
1187      * @config{lsm = (, options only relevant for LSM data sources., a set of related
1188      * configuration options defined below.}
1189      * @config{&nbsp;&nbsp;&nbsp;&nbsp;auto_throttle,
1190      * Throttle inserts into LSM trees if flushing to disk isn't keeping up., a boolean flag;
1191      * default \c true.}
1192      * @config{&nbsp;&nbsp;&nbsp;&nbsp;bloom, create bloom filters on LSM tree
1193      * chunks as they are merged., a boolean flag; default \c true.}
1194      * @config{&nbsp;&nbsp;&nbsp;&nbsp;bloom_bit_count, the number of bits used per item for LSM
1195      * bloom filters., an integer between 2 and 1000; default \c 16.}
1196      * @config{&nbsp;&nbsp;&nbsp;&nbsp;bloom_config, config string used when creating Bloom
1197      * filter files\, passed to WT_SESSION::create., a string; default empty.}
1198      * @config{&nbsp;&nbsp;&nbsp;&nbsp;bloom_hash_count, the number of hash values per item used
1199      * for LSM bloom filters., an integer between 2 and 100; default \c 8.}
1200      * @config{&nbsp;&nbsp;&nbsp;&nbsp;bloom_oldest, create a bloom filter on the oldest LSM
1201      * tree chunk.  Only supported if bloom filters are enabled., a boolean flag; default \c
1202      * false.}
1203      * @config{&nbsp;&nbsp;&nbsp;&nbsp;chunk_count_limit, the maximum number of chunks
1204      * to allow in an LSM tree.  This option automatically times out old data.  As new chunks
1205      * are added old chunks will be removed.  Enabling this option disables LSM background
1206      * merges., an integer; default \c 0.}
1207      * @config{&nbsp;&nbsp;&nbsp;&nbsp;chunk_max, the
1208      * maximum size a single chunk can be.  Chunks larger than this size are not considered for
1209      * further merges.  This is a soft limit\, and chunks larger than this value can be created.
1210      * Must be larger than chunk_size., an integer between 100MB and 10TB; default \c 5GB.}
1211      * @config{&nbsp;&nbsp;&nbsp;&nbsp;chunk_size, the maximum size of the in-memory chunk of an
1212      * LSM tree.  This limit is soft - it is possible for chunks to be temporarily larger than
1213      * this value.  This overrides the \c memory_page_max setting., an integer between 512K and
1214      * 500MB; default \c 10MB.}
1215      * @config{&nbsp;&nbsp;&nbsp;&nbsp;merge_custom = (, configure the
1216      * tree to merge into a custom data source., a set of related configuration options defined
1217      * below.}
1218      * @config{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prefix, custom data
1219      * source prefix instead of \c "file"., a string; default empty.}
1220      * @config{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start_generation, merge
1221      * generation at which the custom data source is used (zero indicates no custom data
1222      * source)., an integer between 0 and 10; default \c 0.}
1223      * @config{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;suffix, custom data source suffix
1224      * instead of \c ".lsm"., a string; default empty.}
1225      * @config{ ),,}
1226      * @config{&nbsp;&nbsp;&nbsp;&nbsp;merge_max, the maximum number of chunks to include in a
1227      * merge operation., an integer between 2 and 100; default \c 15.}
1228      * @config{&nbsp;&nbsp;&nbsp;&nbsp;merge_min, the minimum number of chunks to include in a
1229      * merge operation.  If set to 0 or 1 half the value of merge_max is used., an integer no
1230      * more than 100; default \c 0.}
1231      * @config{ ),,}
1232      * @config{memory_page_image_max, the maximum in-memory page image represented by a single
1233      * storage block.  Depending on compression efficiency\, compression can create storage
1234      * blocks which require significant resources to re-instantiate in the cache\, penalizing
1235      * the performance of future point updates.  The value limits the maximum in-memory page
1236      * image a storage block will need.  If set to 0\, a default of 4 times \c leaf_page_max is
1237      * used., an integer greater than or equal to 0; default \c 0.}
1238      * @config{memory_page_max, the maximum size a page can grow to in memory before being
1239      * reconciled to disk.  The specified size will be adjusted to a lower bound of
1240      * <code>leaf_page_max</code>\, and an upper bound of <code>cache_size / 10</code>. This
1241      * limit is soft - it is possible for pages to be temporarily larger than this value.  This
1242      * setting is ignored for LSM trees\, see \c chunk_size., an integer between 512B and 10TB;
1243      * default \c 5MB.}
1244      * @config{os_cache_dirty_max, maximum dirty system buffer cache usage\, in bytes.  If
1245      * non-zero\, schedule writes for dirty blocks belonging to this object in the system buffer
1246      * cache after that many bytes from this object are written into the buffer cache., an
1247      * integer greater than or equal to 0; default \c 0.}
1248      * @config{os_cache_max, maximum system buffer cache usage\, in bytes.  If non-zero\, evict
1249      * object blocks from the system buffer cache after that many bytes from this object are
1250      * read or written into the buffer cache., an integer greater than or equal to 0; default \c
1251      * 0.}
1252      * @config{prefix_compression, configure prefix compression on row-store leaf pages., a
1253      * boolean flag; default \c false.}
1254      * @config{prefix_compression_min, minimum gain before prefix compression will be used on
1255      * row-store leaf pages., an integer greater than or equal to 0; default \c 4.}
1256      * @config{readonly, the file is read-only.  All methods that may modify a file are
1257      * disabled.  See @ref readonly for more information., a boolean flag; default \c false.}
1258      * @config{split_pct, the Btree page split size as a percentage of the maximum Btree page
1259      * size\, that is\, when a Btree page is split\, it will be split into smaller pages\, where
1260      * each page is the specified percentage of the maximum Btree page size., an integer between
1261      * 50 and 100; default \c 90.}
1262      * @config{tiered = (, options only relevant for tiered data sources., a set of related
1263      * configuration options defined below.}
1264      * @config{&nbsp;&nbsp;&nbsp;&nbsp;chunk_size, the
1265      * maximum size of the hot chunk of tiered tree.  This limit is soft - it is possible for
1266      * chunks to be temporarily larger than this value., an integer greater than or equal to 1M;
1267      * default \c 1GB.}
1268      * @config{&nbsp;&nbsp;&nbsp;&nbsp;tiers, list of data sources to combine
1269      * into a tiered storage structure., a list of strings; default empty.}
1270      * @config{ ),,}
1271      * @config{tiered_storage = (, configure a storage source for this table., a set of related
1272      * configuration options defined below.}
1273      * @config{&nbsp;&nbsp;&nbsp;&nbsp;auth_token,
1274      * authentication string identifier., a string; default empty.}
1275      * @config{&nbsp;&nbsp;&nbsp;&nbsp;bucket, The bucket indicating the location for this
1276      * table., a string; default empty.}
1277      * @config{&nbsp;&nbsp;&nbsp;&nbsp;local_retention, time
1278      * in seconds to retain data on tiered storage on the local tier for faster read access., an
1279      * integer between 0 and 10000; default \c 300.}
1280      * @config{&nbsp;&nbsp;&nbsp;&nbsp;name,
1281      * Permitted values are \c "none" or custom storage source name created with
1282      * WT_CONNECTION::add_storage_source.  See @ref custom_storage_sources for more
1283      * information., a string; default \c none.}
1284      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
1285      * object_target_size, the approximate size of objects before creating them on the tiered
1286      * storage tier., an integer between 100K and 10TB; default \c 10M.}
1287      * @config{ ),,}
1288      * @config{type, set the type of data source used to store a column group\, index or simple
1289      * table.  By default\, a \c "file:" URI is derived from the object name.  The \c type
1290      * configuration can be used to switch to a different data source\, such as LSM or an
1291      * extension configured by the application., a string; default \c file.}
1292      * @config{value_format, the format of the data packed into value items.  See @ref
1293      * schema_format_types for details.  By default\, the value_format is \c 'u' and
1294      * applications use a WT_ITEM structure to manipulate raw byte arrays.  Value items of type
1295      * 't' are bitfields\, and when configured with record number type keys\, will be stored
1296      * using a fixed-length store., a format string; default \c u.}
1297      * @config{verbose, enable messages for various events.  Options are given as a list\, such
1298      * as <code>"verbose=[write_timestamp]"</code>., a list\, with values chosen from the
1299      * following options: \c "write_timestamp"; default \c [].}
1300      * @config{write_timestamp_usage, describe how timestamps are expected to be used on
1301      * modifications to the table.  This option should be used in conjunction with the
1302      * corresponding \c write_timestamp configuration under the \c assert and \c verbose options
1303      * to provide logging and assertions for incorrect timestamp usage.  The choices are \c
1304      * always which ensures a timestamp is used for every operation on a table\, \c
1305      * key_consistent to ensure that once timestamps are used for a key\, they are always used\,
1306      * \c ordered is like \c key_consistent except it also enforces that subsequent updates to
1307      * each key must use increasing timestamps\, \c mixed_mode is like \c ordered except that
1308      * updates with no timestamp are allowed and have the effect of resetting the chain of
1309      * updates once the transaction ID based snapshot is no longer relevant\, \c never enforces
1310      * that timestamps are never used for a table and \c none does not enforce any expectation
1311      * on timestamp usage meaning that no log message or assertions will be produced regardless
1312      * of the corresponding \c assert and \c verbose settings., a string\, chosen from the
1313      * following options: \c "always"\, \c "key_consistent"\, \c "mixed_mode"\, \c "never"\, \c
1314      * "none"\, \c "ordered"; default \c none.}
1315      * @configend
1316      * @errors
1317      */
1318     int __F(create)(WT_SESSION *session,
1319         const char *name, const char *config);
1320 
1321     /*!
1322      * Compact a live row- or column-store btree or LSM tree.
1323      *
1324      * @snippet ex_all.c Compact a table
1325      *
1326      * @param session the session handle
1327      * @param name the URI of the object to compact, such as
1328      * \c "table:stock"
1329      * @configstart{WT_SESSION.compact, see dist/api_data.py}
1330      * @config{timeout, maximum amount of time to allow for compact in seconds.  The actual
1331      * amount of time spent in compact may exceed the configured value.  A value of zero
1332      * disables the timeout., an integer; default \c 1200.}
1333      * @configend
1334      * @errors
1335      */
1336     int __F(compact)(WT_SESSION *session,
1337         const char *name, const char *config);
1338 
1339     /*!
1340      * Drop (delete) an object.
1341      *
1342      * @exclusive
1343      *
1344      * @not_transactional
1345      *
1346      * @snippet ex_all.c Drop a table
1347      *
1348      * @param session the session handle
1349      * @param name the URI of the object to drop, such as \c "table:stock"
1350      * @configstart{WT_SESSION.drop, see dist/api_data.py}
1351      * @config{force, return success if the object does not exist., a boolean flag; default \c
1352      * false.}
1353      * @config{remove_files, if the underlying files should be removed., a boolean flag; default
1354      * \c true.}
1355      * @configend
1356      * @ebusy_errors
1357      */
1358     int __F(drop)(WT_SESSION *session,
1359         const char *name, const char *config);
1360 
1361     /*!
1362      * Join a join cursor with a reference cursor.
1363      *
1364      * @snippet ex_schema.c Join cursors
1365      *
1366      * @param session the session handle
1367      * @param join_cursor a cursor that was opened using a
1368      * \c "join:" URI. It may not have been used for any operations
1369      * other than other join calls.
1370      * @param ref_cursor an index cursor having the same base table
1371      * as the join_cursor, or a table cursor open on the same base table,
1372      * or another join cursor. Unless the ref_cursor is another join
1373      * cursor, it must be positioned.
1374      *
1375      * The ref_cursor limits the results seen by iterating the
1376      * join_cursor to table items referred to by the key in this
1377      * index. The set of keys referred to is modified by the compare
1378      * config option.
1379      *
1380      * Multiple join calls builds up a set of ref_cursors, and
1381      * by default, the results seen by iteration are the intersection
1382      * of the cursor ranges participating in the join. When configured
1383      * with \c "operation=or", the results seen are the union of
1384      * the participating cursor ranges.
1385      *
1386      * After the join call completes, the ref_cursor cursor may not be
1387      * used for any purpose other than get_key and get_value. Any other
1388      * cursor method (e.g. next, prev,close) will fail. When the
1389      * join_cursor is closed, the ref_cursor is made available for
1390      * general use again. The application should close ref_cursor when
1391      * finished with it, although not before the join_cursor is closed.
1392      *
1393      * @configstart{WT_SESSION.join, see dist/api_data.py}
1394      * @config{bloom_bit_count, the number of bits used per item for the bloom filter., an
1395      * integer between 2 and 1000; default \c 16.}
1396      * @config{bloom_false_positives, return all values that pass the bloom filter\, without
1397      * eliminating any false positives., a boolean flag; default \c false.}
1398      * @config{bloom_hash_count, the number of hash values per item for the bloom filter., an
1399      * integer between 2 and 100; default \c 8.}
1400      * @config{compare, modifies the set of items to be returned so that the index key satisfies
1401      * the given comparison relative to the key set in this cursor., a string\, chosen from the
1402      * following options: \c "eq"\, \c "ge"\, \c "gt"\, \c "le"\, \c "lt"; default \c "eq".}
1403      * @config{count, set an approximate count of the elements that would be included in the
1404      * join.  This is used in sizing the bloom filter\, and also influences evaluation order for
1405      * cursors in the join.  When the count is equal for multiple bloom filters in a composition
1406      * of joins\, the bloom filter may be shared., an integer; default \c .}
1407      * @config{operation, the operation applied between this and other joined cursors.  When
1408      * "operation=and" is specified\, all the conditions implied by joins must be satisfied for
1409      * an entry to be returned by the join cursor; when "operation=or" is specified\, only one
1410      * must be satisfied.  All cursors joined to a join cursor must have matching operations., a
1411      * string\, chosen from the following options: \c "and"\, \c "or"; default \c "and".}
1412      * @config{strategy, when set to bloom\, a bloom filter is created and populated for this
1413      * index.  This has an up front cost but may reduce the number of accesses to the main table
1414      * when iterating the joined cursor.  The bloom setting requires that count be set., a
1415      * string\, chosen from the following options: \c "bloom"\, \c "default"; default empty.}
1416      * @configend
1417      * @errors
1418      */
1419     int __F(join)(WT_SESSION *session, WT_CURSOR *join_cursor,
1420         WT_CURSOR *ref_cursor, const char *config);
1421 
1422     /*!
1423      * Flush the log.
1424      *
1425      * WT_SESSION::log_flush will fail if logging is not enabled.
1426      *
1427      * @param session the session handle
1428      * @configstart{WT_SESSION.log_flush, see dist/api_data.py}
1429      * @config{sync, forcibly flush the log and wait for it to achieve the synchronization level
1430      * specified.  The \c background setting initiates a background synchronization intended to
1431      * be used with a later call to WT_SESSION::transaction_sync.  The \c off setting forces any
1432      * buffered log records to be written to the file system.  The \c on setting forces log
1433      * records to be written to the storage device., a string\, chosen from the following
1434      * options: \c "background"\, \c "off"\, \c "on"; default \c on.}
1435      * @configend
1436      * @errors
1437      */
1438     int __F(log_flush)(WT_SESSION *session, const char *config);
1439 
1440     /*!
1441      * Insert a ::WT_LOGREC_MESSAGE type record in the database log files
1442      * (the database must be configured for logging when this method is
1443      * called).
1444      *
1445      * @param session the session handle
1446      * @param format a printf format specifier
1447      * @errors
1448      */
1449     int __F(log_printf)(WT_SESSION *session, const char *format, ...);
1450 
1451     /*!
1452      * Rename an object.
1453      *
1454      * @not_transactional
1455      *
1456      * @snippet ex_all.c Rename a table
1457      *
1458      * @exclusive
1459      *
1460      * @param session the session handle
1461      * @param uri the current URI of the object, such as \c "table:old"
1462      * @param newuri the new URI of the object, such as \c "table:new"
1463      * @configempty{WT_SESSION.rename, see dist/api_data.py}
1464      * @ebusy_errors
1465      */
1466     int __F(rename)(WT_SESSION *session,
1467         const char *uri, const char *newuri, const char *config);
1468 
1469     /*!
1470      * Reset the session handle.
1471      *
1472      * This method resets all cursors associated with this session,
1473      * discards cached resources and resets session statistics.
1474      * The session can be re-used immediately after this call returns.
1475      * If a transaction is running on this session, then this call takes
1476      * no action and return an error.
1477      *
1478      * @snippet ex_all.c Reset the session
1479      *
1480      * @param session the session handle
1481      * @errors
1482      */
1483     int __F(reset)(WT_SESSION *session);
1484 
1485     /*!
1486      * Salvage a table or file.
1487      *
1488      * Salvage rebuilds the file, or files of which a table is comprised,
1489      * discarding any corrupted file blocks.
1490      *
1491      * Previously deleted records may re-appear, and inserted records may
1492      * disappear, when salvage is done, so salvage should not be run
1493      * unless it is known to be necessary.  Normally, salvage should be
1494      * called after a table or file has been corrupted, as reported by the
1495      * WT_SESSION::verify method.
1496      *
1497      * Files are rebuilt in place, the salvage method overwrites the
1498      * existing files.
1499      *
1500      * @exclusive
1501      *
1502      * @snippet ex_all.c Salvage a table
1503      *
1504      * @param session the session handle
1505      * @param name the URI of the table or file to salvage
1506      * @configstart{WT_SESSION.salvage, see dist/api_data.py}
1507      * @config{force, force salvage even of files that do not appear to be WiredTiger files., a
1508      * boolean flag; default \c false.}
1509      * @configend
1510      * @ebusy_errors
1511      */
1512     int __F(salvage)(WT_SESSION *session,
1513         const char *name, const char *config);
1514 
1515     /*!
1516      * Truncate a file, table, cursor range, or backup cursor
1517      *
1518      * Truncate a table or file.
1519      * @snippet ex_all.c Truncate a table
1520      *
1521      * Truncate a cursor range.  When truncating based on a cursor position,
1522      * it is not required the cursor reference a record in the object, only
1523      * that the key be set.  This allows applications to discard portions of
1524      * the object name space without knowing exactly what records the object
1525      * contains.
1526      * @snippet ex_all.c Truncate a range
1527      *
1528      * Any specified cursors end with no position, and subsequent calls to
1529      * the WT_CURSOR::next (WT_CURSOR::prev) method will iterate from the
1530      * beginning (end) of the table.
1531      *
1532      * When a range truncate is in progress, and another transaction inserts
1533      * a key into that range, the behavior is not well defined - a conflict
1534      * may be detected or both transactions may be permitted to commit. If
1535      * they do commit, and if there is a crash and recovery runs, the result
1536      * may be different than what was in cache before the crash.
1537      *
1538      * Truncate a backup cursor.  This operation removes all log files that
1539      * have been returned by the backup cursor.  It can be used to remove log
1540      * files after copying them during @ref backup_incremental.
1541      * @snippet ex_backup.c Truncate a backup cursor
1542      *
1543      * @param session the session handle
1544      * @param name the URI of the table or file to truncate, or \c "log:"
1545      * for a backup cursor
1546      * @param start optional cursor marking the first record discarded;
1547      * if <code>NULL</code>, the truncate starts from the beginning of
1548      * the object; must be provided when truncating a backup cursor
1549      * @param stop optional cursor marking the last record discarded;
1550      * if <code>NULL</code>, the truncate continues to the end of the
1551      * object; ignored when truncating a backup cursor
1552      * @configempty{WT_SESSION.truncate, see dist/api_data.py}
1553      * @errors
1554      */
1555     int __F(truncate)(WT_SESSION *session,
1556         const char *name,
1557         WT_HANDLE_NULLABLE(WT_CURSOR) *start,
1558         WT_HANDLE_NULLABLE(WT_CURSOR) *stop,
1559         const char *config);
1560 
1561     /*!
1562      * Upgrade a table or file.
1563      *
1564      * Upgrade upgrades a table or file, if upgrade is required.
1565      *
1566      * @exclusive
1567      *
1568      * @snippet ex_all.c Upgrade a table
1569      *
1570      * @param session the session handle
1571      * @param name the URI of the table or file to upgrade
1572      * @configempty{WT_SESSION.upgrade, see dist/api_data.py}
1573      * @ebusy_errors
1574      */
1575     int __F(upgrade)(WT_SESSION *session,
1576         const char *name, const char *config);
1577 
1578     /*!
1579      * Verify a table or file.
1580      *
1581      * Verify reports if a file, or the files of which a table is
1582      * comprised, have been corrupted.  The WT_SESSION::salvage method
1583      * can be used to repair a corrupted file,
1584      *
1585      * @snippet ex_all.c Verify a table
1586      *
1587      * @exclusive
1588      *
1589      * @param session the session handle
1590      * @param name the URI of the table or file to verify, optional if verifying the history
1591      * store
1592      * @configstart{WT_SESSION.verify, see dist/api_data.py}
1593      * @config{dump_address, Display page addresses\, time windows\, and page types as pages are
1594      * verified\, using the application's message handler\, intended for debugging., a boolean
1595      * flag; default \c false.}
1596      * @config{dump_blocks, Display the contents of on-disk blocks as they are verified\, using
1597      * the application's message handler\, intended for debugging., a boolean flag; default \c
1598      * false.}
1599      * @config{dump_layout, Display the layout of the files as they are verified\, using the
1600      * application's message handler\, intended for debugging; requires optional support from
1601      * the block manager., a boolean flag; default \c false.}
1602      * @config{dump_offsets, Display the contents of specific on-disk blocks\, using the
1603      * application's message handler\, intended for debugging., a list of strings; default
1604      * empty.}
1605      * @config{dump_pages, Display the contents of in-memory pages as they are verified\, using
1606      * the application's message handler\, intended for debugging., a boolean flag; default \c
1607      * false.}
1608      * @config{stable_timestamp, Ensure that no data has a start timestamp after the stable
1609      * timestamp\, to be run after rollback_to_stable., a boolean flag; default \c false.}
1610      * @config{strict, Treat any verification problem as an error; by default\, verify will
1611      * warn\, but not fail\, in the case of errors that won't affect future behavior (for
1612      * example\, a leaked block)., a boolean flag; default \c false.}
1613      * @configend
1614      * @ebusy_errors
1615      */
1616     int __F(verify)(WT_SESSION *session,
1617         const char *name, const char *config);
1618     /*! @} */
1619 
1620     /*!
1621      * @name Transactions
1622      * @{
1623      */
1624     /*!
1625      * Start a transaction in this session.
1626      *
1627      * The transaction remains active until ended by
1628      * WT_SESSION::commit_transaction or WT_SESSION::rollback_transaction.
1629      * Operations performed on cursors capable of supporting transactional
1630      * operations that are already open in this session, or which are opened
1631      * before the transaction ends, will operate in the context of the
1632      * transaction.
1633      *
1634      * @requires_notransaction
1635      *
1636      * @snippet ex_all.c transaction commit/rollback
1637      *
1638      * @param session the session handle
1639      * @configstart{WT_SESSION.begin_transaction, see dist/api_data.py}
1640      * @config{ignore_prepare, whether to ignore the updates by other prepared transactions as
1641      * part of read operations of this transaction.  When \c true\, forces the transaction to be
1642      * read-only.  Use \c force to ignore prepared updates and permit writes (which can cause
1643      * lost updates unless the application knows something about the relationship between
1644      * prepared transactions and the updates that are ignoring them)., a string\, chosen from
1645      * the following options: \c "false"\, \c "force"\, \c "true"; default \c false.}
1646      * @config{isolation, the isolation level for this transaction; defaults to the session's
1647      * isolation level., a string\, chosen from the following options: \c "read-uncommitted"\,
1648      * \c "read-committed"\, \c "snapshot"; default empty.}
1649      * @config{name, name of the transaction for tracing and debugging., a string; default
1650      * empty.}
1651      * @config{operation_timeout_ms, when non-zero\, a requested limit on the time taken to
1652      * complete operations in this transaction.  Time is measured in real time milliseconds from
1653      * the start of each WiredTiger API call.  There is no guarantee any operation will not take
1654      * longer than this amount of time.  If WiredTiger notices the limit has been exceeded\, an
1655      * operation may return a WT_ROLLBACK error.  Default is to have no limit., an integer
1656      * greater than or equal to 1; default \c 0.}
1657      * @config{priority, priority of the transaction for resolving conflicts.  Transactions with
1658      * higher values are less likely to abort., an integer between -100 and 100; default \c 0.}
1659      * @config{read_before_oldest, allows the caller to specify a read timestamp less than the
1660      * oldest timestamp but newer than or equal to the pinned timestamp.  Cannot be set to true
1661      * while also rounding up the read timestamp.  See @ref transaction_timestamps., a boolean
1662      * flag; default \c false.}
1663      * @config{read_timestamp, read using the specified timestamp.  The supplied value must not
1664      * be older than the current oldest timestamp.  See @ref transaction_timestamps., a string;
1665      * default empty.}
1666      * @config{roundup_timestamps = (, round up timestamps of the transaction.  This setting
1667      * alters the visibility expected in a transaction.  See @ref transaction_timestamps., a set
1668      * of related configuration options defined below.}
1669      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
1670      * prepared, applicable only for prepared transactions.  Indicates if the prepare timestamp
1671      * and the commit timestamp of this transaction can be rounded up.  If the prepare timestamp
1672      * is less than the oldest timestamp\, the prepare timestamp will be rounded to the oldest
1673      * timestamp.  If the commit timestamp is less than the prepare timestamp\, the commit
1674      * timestamp will be rounded up to the prepare timestamp., a boolean flag; default \c
1675      * false.}
1676      * @config{&nbsp;&nbsp;&nbsp;&nbsp;read, if the read timestamp is less than the
1677      * oldest timestamp\, the read timestamp will be rounded up to the oldest timestamp., a
1678      * boolean flag; default \c false.}
1679      * @config{ ),,}
1680      * @config{sync, whether to sync log records when the transaction commits\, inherited from
1681      * ::wiredtiger_open \c transaction_sync., a boolean flag; default empty.}
1682      * @configend
1683      * @errors
1684      */
1685     int __F(begin_transaction)(WT_SESSION *session, const char *config);
1686 
1687     /*!
1688      * Commit the current transaction.
1689      *
1690      * A transaction must be in progress when this method is called.
1691      *
1692      * If WT_SESSION::commit_transaction returns an error, the transaction
1693      * was rolled back, not committed.
1694      *
1695      * @requires_transaction
1696      *
1697      * @snippet ex_all.c transaction commit/rollback
1698      *
1699      * @param session the session handle
1700      * @configstart{WT_SESSION.commit_transaction, see dist/api_data.py}
1701      * @config{commit_timestamp, set the commit timestamp for the current transaction.  The
1702      * supplied value must not be older than the first commit timestamp set for the current
1703      * transaction.  The value must also not be older than the current oldest and stable
1704      * timestamps.  See @ref transaction_timestamps., a string; default empty.}
1705      * @config{durable_timestamp, set the durable timestamp for the current transaction.  The
1706      * supplied value must not be older than the commit timestamp set for the current
1707      * transaction.  The value must also not be older than the current stable timestamp.  See
1708      * @ref transaction_timestamps., a string; default empty.}
1709      * @config{operation_timeout_ms, when non-zero\, a requested limit on the time taken to
1710      * complete operations in this transaction.  Time is measured in real time milliseconds from
1711      * the start of each WiredTiger API call.  There is no guarantee any operation will not take
1712      * longer than this amount of time.  If WiredTiger notices the limit has been exceeded\, an
1713      * operation may return a WT_ROLLBACK error.  Default is to have no limit., an integer
1714      * greater than or equal to 1; default \c 0.}
1715      * @config{sync, override whether to sync log records when the transaction commits\,
1716      * inherited from ::wiredtiger_open \c transaction_sync.  The \c background setting
1717      * initiates a background synchronization intended to be used with a later call to
1718      * WT_SESSION::transaction_sync.  The \c off setting does not wait for record to be written
1719      * or synchronized.  The \c on setting forces log records to be written to the storage
1720      * device., a string\, chosen from the following options: \c "background"\, \c "off"\, \c
1721      * "on"; default empty.}
1722      * @configend
1723      * @errors
1724      */
1725     int __F(commit_transaction)(WT_SESSION *session, const char *config);
1726 
1727     /*!
1728      * Prepare the current transaction.
1729      *
1730      * A transaction must be in progress when this method is called.
1731      *
1732      * Preparing a transaction will guarantee a subsequent commit will
1733      * succeed. Only commit and rollback are allowed on a transaction after
1734      * it has been prepared. The transaction prepare API is designed to
1735      * support MongoDB exclusively, and guarantees update conflicts have
1736      * been resolved, but does not guarantee durability.
1737      *
1738      * @requires_transaction
1739      *
1740      * @snippet ex_all.c transaction prepare
1741      *
1742      * @param session the session handle
1743      * @configstart{WT_SESSION.prepare_transaction, see dist/api_data.py}
1744      * @config{prepare_timestamp, set the prepare timestamp for the updates of the current
1745      * transaction.  The supplied value must not be older than any active read timestamps.  See
1746      * @ref transaction_timestamps., a string; default empty.}
1747      * @configend
1748      * @errors
1749      */
1750     int __F(prepare_transaction)(WT_SESSION *session, const char *config);
1751 
1752     /*!
1753      * Reset the snapshot.
1754      *
1755      * This method resets snapshots for snapshot isolation transactions to
1756      * update their existing snapshot. It raises an error when this API
1757      * is used for isolation other than snapshot isolation mode or when the session
1758      * has performed any write operations.
1759      * This API internally releases the current snapshot and gets the new running
1760      * transactions snapshot to avoid pinning the content in the database that is no
1761      * longer needed. Applications that don't use read_timestamp for the search may
1762      * see different results compared to earlier with the updated snapshot.
1763      *
1764      * @requires_transaction
1765      *
1766      * @snippet ex_all.c reset snapshot
1767      *
1768      * @param session the session handle
1769      * @errors
1770      */
1771     int __F(reset_snapshot)(WT_SESSION *session);
1772 
1773     /*!
1774      * Roll back the current transaction.
1775      *
1776      * A transaction must be in progress when this method is called.
1777      *
1778      * All cursors are reset.
1779      *
1780      * @requires_transaction
1781      *
1782      * @snippet ex_all.c transaction commit/rollback
1783      *
1784      * @param session the session handle
1785      * @configstart{WT_SESSION.rollback_transaction, see dist/api_data.py}
1786      * @config{operation_timeout_ms, when non-zero\, a requested limit on the time taken to
1787      * complete operations in this transaction.  Time is measured in real time milliseconds from
1788      * the start of each WiredTiger API call.  There is no guarantee any operation will not take
1789      * longer than this amount of time.  If WiredTiger notices the limit has been exceeded\, an
1790      * operation may return a WT_ROLLBACK error.  Default is to have no limit., an integer
1791      * greater than or equal to 1; default \c 0.}
1792      * @configend
1793      * @errors
1794      */
1795     int __F(rollback_transaction)(WT_SESSION *session, const char *config);
1796 
1797     /*!
1798      * Set a timestamp on a transaction.
1799      *
1800      * @snippet ex_all.c transaction timestamp
1801      *
1802      * @requires_transaction
1803      *
1804      * @param session the session handle
1805      * @configstart{WT_SESSION.timestamp_transaction, see dist/api_data.py}
1806      * @config{commit_timestamp, set the commit timestamp for the current transaction.  The
1807      * supplied value must not be older than the first commit timestamp set for the current
1808      * transaction.  The value must also not be older than the current oldest and stable
1809      * timestamps.  See @ref transaction_timestamps., a string; default empty.}
1810      * @config{durable_timestamp, set the durable timestamp for the current transaction.  The
1811      * supplied value must not be older than the commit timestamp set for the current
1812      * transaction.  The value must also not be older than the current stable timestamp.  See
1813      * @ref transaction_timestamps., a string; default empty.}
1814      * @config{prepare_timestamp, set the prepare timestamp for the updates of the current
1815      * transaction.  The supplied value must not be older than any active read timestamps.  See
1816      * @ref transaction_timestamps., a string; default empty.}
1817      * @config{read_timestamp, read using the specified timestamp.  The supplied value must not
1818      * be older than the current oldest timestamp.  This can only be set once for a transaction.
1819      * See @ref transaction_timestamps., a string; default empty.}
1820      * @configend
1821      * @errors
1822      */
1823     int __F(timestamp_transaction)(WT_SESSION *session, const char *config);
1824 
1825     /*!
1826      * Query the session's transaction timestamp state.
1827      *
1828      * @param session the session handle
1829      * @param[out] hex_timestamp a buffer that will be set to the
1830      * hexadecimal encoding of the timestamp being queried.  Must be large
1831      * enough to hold a NUL terminated, hex-encoded 8B timestamp (17 bytes).
1832      * @configstart{WT_SESSION.query_timestamp, see dist/api_data.py}
1833      * @config{get, specify which timestamp to query: \c commit returns the most recently set
1834      * commit_timestamp.  \c first_commit returns the first set commit_timestamp.  \c prepare
1835      * returns the timestamp used in preparing a transaction.  \c read returns the timestamp at
1836      * which the transaction is reading at.  See @ref transaction_timestamps., a string\, chosen
1837      * from the following options: \c "commit"\, \c "first_commit"\, \c "prepare"\, \c "read";
1838      * default \c read.}
1839      * @configend
1840      * @errors
1841      * If the session is not in a transaction ::WT_NOTFOUND will be
1842      * returned.
1843      */
1844     int __F(query_timestamp)(
1845         WT_SESSION *session, char *hex_timestamp, const char *config);
1846 
1847     /*!
1848      * Write a transactionally consistent snapshot of a database or set of
1849      * objects.  In the absence of transaction timestamps, the checkpoint
1850      * includes all transactions committed before the checkpoint starts.
1851      *
1852      * When timestamps are in use and a \c stable_timestamp has been set
1853      * via WT_CONNECTION::set_timestamp and the checkpoint runs with
1854      * \c use_timestamp=true (the default), updates committed with a
1855      * timestamp larger than the \c stable_timestamp will not be included
1856      * in the checkpoint for tables configured with \c log=(enabled=false).
1857      * For tables with logging enabled, all committed changes will be
1858      * included in the checkpoint (since recovery would roll them forward
1859      * anyway).
1860      *
1861      * Additionally, existing named checkpoints may optionally be
1862      * discarded.
1863      *
1864      * @requires_notransaction
1865      *
1866      * @snippet ex_all.c Checkpoint examples
1867      *
1868      * @param session the session handle
1869      * @configstart{WT_SESSION.checkpoint, see dist/api_data.py}
1870      * @config{drop, specify a list of checkpoints to drop.  The list may additionally contain
1871      * one of the following keys: \c "from=all" to drop all checkpoints\, \c "from=<checkpoint>"
1872      * to drop all checkpoints after and including the named checkpoint\, or \c
1873      * "to=<checkpoint>" to drop all checkpoints before and including the named checkpoint.
1874      * Checkpoints cannot be dropped if open in a cursor.  While a hot backup is in progress\,
1875      * checkpoints created prior to the start of the backup cannot be dropped., a list of
1876      * strings; default empty.}
1877      * @config{force, if false (the default)\, checkpoints may be skipped if the underlying
1878      * object has not been modified\, if true\, this option forces the checkpoint., a boolean
1879      * flag; default \c false.}
1880      * @config{name, if set\, specify a name for the checkpoint (note that checkpoints including
1881      * LSM trees may not be named)., a string; default empty.}
1882      * @config{target, if non-empty\, checkpoint the list of objects., a list of strings;
1883      * default empty.}
1884      * @config{use_timestamp, if true (the default)\, create the checkpoint as of the last
1885      * stable timestamp if timestamps are in use\, or all current updates if there is no stable
1886      * timestamp set.  If false\, this option generates a checkpoint with all updates including
1887      * those later than the timestamp., a boolean flag; default \c true.}
1888      * @configend
1889      * @errors
1890      */
1891     int __F(checkpoint)(WT_SESSION *session, const char *config);
1892 
1893     /*!
1894      * Return the transaction ID range pinned by the session handle.
1895      *
1896      * The ID range is approximate and is calculated based on the oldest
1897      * ID needed for the active transaction in this session, compared
1898      * to the newest transaction in the system.
1899      *
1900      * @snippet ex_all.c transaction pinned range
1901      *
1902      * @param session the session handle
1903      * @param[out] range the range of IDs pinned by this session. Zero if
1904      * there is no active transaction.
1905      * @errors
1906      */
1907     int __F(transaction_pinned_range)(WT_SESSION* session, uint64_t *range);
1908 
1909     /*!
1910      * Wait for a transaction to become synchronized.  This method is
1911      * only useful when ::wiredtiger_open is configured with the
1912      * \c transaction_sync setting disabled.
1913      *
1914      * @requires_notransaction
1915      *
1916      * @snippet ex_all.c Transaction sync
1917      *
1918      * @param session the session handle
1919      * @configstart{WT_SESSION.transaction_sync, see dist/api_data.py}
1920      * @config{timeout_ms, maximum amount of time to wait for background sync to complete in
1921      * milliseconds.  A value of zero disables the timeout and returns immediately., an integer;
1922      * default \c 1200000.}
1923      * @configend
1924      * @errors
1925      */
1926     int __F(transaction_sync)(WT_SESSION *session, const char *config);
1927     /*! @} */
1928 
1929 #ifndef DOXYGEN
1930     /*!
1931      * Call into the library.
1932      *
1933      * This method is used for breakpoints and to set other configuration
1934      * when debugging layers not directly supporting those features.
1935      *
1936      * @param session the session handle
1937      * @errors
1938      */
1939     int __F(breakpoint)(WT_SESSION *session);
1940 #endif
1941 };
1942 
1943 /*!
1944  * A connection to a WiredTiger database.  The connection may be opened within
1945  * the same address space as the caller or accessed over a socket connection.
1946  *
1947  * Most applications will open a single connection to a database for each
1948  * process.  The first process to open a connection to a database will access
1949  * the database in its own address space.  Subsequent connections (if allowed)
1950  * will communicate with the first process over a socket connection to perform
1951  * their operations.
1952  *
1953  * <b>Thread safety:</b> A WT_CONNECTION handle may be shared between threads,
1954  * see @ref threads for more information.
1955  */
1956 struct __wt_connection {
1957     /*!
1958      * Close a connection.
1959      *
1960      * Any open sessions will be closed. This will release the resources
1961      * associated with the session handle, including rolling back any
1962      * active transactions and closing any cursors that remain open in the
1963      * session.
1964      *
1965      * @snippet ex_all.c Close a connection
1966      *
1967      * @param connection the connection handle
1968      * @configstart{WT_CONNECTION.close, see dist/api_data.py}
1969      * @config{leak_memory, don't free memory during close., a boolean flag; default \c false.}
1970      * @config{use_timestamp, by default\, create the close checkpoint as of the last stable
1971      * timestamp if timestamps are in use\, or all current updates if there is no stable
1972      * timestamp set.  If false\, this option generates a checkpoint with all updates., a
1973      * boolean flag; default \c true.}
1974      * @configend
1975      * @errors
1976      */
1977     int __F(close)(WT_HANDLE_CLOSED(WT_CONNECTION) *connection,
1978         const char *config);
1979 
1980 #ifndef DOXYGEN
1981     /*!
1982      * Output debug information for various subsystems. The output format
1983      * may change over time, gathering the debug information may be
1984      * invasive, and the information reported may not provide a point in
1985      * time view of the system.
1986      *
1987      * @param connection the connection handle
1988      * @configstart{WT_CONNECTION.debug_info, see dist/api_data.py}
1989      * @config{cache, print cache information., a boolean flag; default \c false.}
1990      * @config{cursors, print all open cursor information., a boolean flag; default \c false.}
1991      * @config{handles, print open handles information., a boolean flag; default \c false.}
1992      * @config{log, print log information., a boolean flag; default \c false.}
1993      * @config{sessions, print open session information., a boolean flag; default \c false.}
1994      * @config{txn, print global txn information., a boolean flag; default \c false.}
1995      * @configend
1996      * @errors
1997      */
1998     int __F(debug_info)(WT_CONNECTION *connection, const char *config);
1999 #endif
2000 
2001     /*!
2002      * Reconfigure a connection handle.
2003      *
2004      * @snippet ex_all.c Reconfigure a connection
2005      *
2006      * @param connection the connection handle
2007      * @configstart{WT_CONNECTION.reconfigure, see dist/api_data.py}
2008      * @config{cache_max_wait_ms, the maximum number of milliseconds an application thread will
2009      * wait for space to be available in cache before giving up.  Default will wait forever., an
2010      * integer greater than or equal to 0; default \c 0.}
2011      * @config{cache_overhead, assume the heap allocator overhead is the specified percentage\,
2012      * and adjust the cache usage by that amount (for example\, if there is 10GB of data in
2013      * cache\, a percentage of 10 means WiredTiger treats this as 11GB). This value is
2014      * configurable because different heap allocators have different overhead and different
2015      * workloads will have different heap allocation sizes and patterns\, therefore applications
2016      * may need to adjust this value based on allocator choice and behavior in measured
2017      * workloads., an integer between 0 and 30; default \c 8.}
2018      * @config{cache_size, maximum heap memory to allocate for the cache.  A database should
2019      * configure either \c cache_size or \c shared_cache but not both., an integer between 1MB
2020      * and 10TB; default \c 100MB.}
2021      * @config{checkpoint = (, periodically checkpoint the database.  Enabling the checkpoint
2022      * server uses a session from the configured session_max., a set of related configuration
2023      * options defined below.}
2024      * @config{&nbsp;&nbsp;&nbsp;&nbsp;log_size, wait for this amount of
2025      * log record bytes to be written to the log between each checkpoint.  If non-zero\, this
2026      * value will use a minimum of the log file size.  A database can configure both log_size
2027      * and wait to set an upper bound for checkpoints; setting this value above 0 configures
2028      * periodic checkpoints., an integer between 0 and 2GB; default \c 0.}
2029      * @config{&nbsp;&nbsp;&nbsp;&nbsp;wait, seconds to wait between each checkpoint; setting
2030      * this value above 0 configures periodic checkpoints., an integer between 0 and 100000;
2031      * default \c 0.}
2032      * @config{ ),,}
2033      * @config{compatibility = (, set compatibility version of database.  Changing the
2034      * compatibility version requires that there are no active operations for the duration of
2035      * the call., a set of related configuration options defined below.}
2036      * @config{&nbsp;&nbsp;&nbsp;&nbsp;release, compatibility release version string., a string;
2037      * default empty.}
2038      * @config{ ),,}
2039      * @config{debug_mode = (, control the settings of various extended debugging features., a
2040      * set of related configuration options defined below.}
2041      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2042      * checkpoint_retention, adjust log archiving to retain the log records of this number of
2043      * checkpoints.  Zero or one means perform normal archiving., an integer between 0 and 1024;
2044      * default \c 0.}
2045      * @config{&nbsp;&nbsp;&nbsp;&nbsp;corruption_abort, if true\, dump the core
2046      * in the diagnostic mode on encountering the data corruption., a boolean flag; default \c
2047      * true.}
2048      * @config{&nbsp;&nbsp;&nbsp;&nbsp;cursor_copy, if true\, use the system allocator to
2049      * make a copy of any data returned by a cursor operation and return the copy instead.  The
2050      * copy is freed on the next cursor operation.  This allows memory sanitizers to detect
2051      * inappropriate references to memory owned by cursors., a boolean flag; default \c false.}
2052      * @config{&nbsp;&nbsp;&nbsp;&nbsp;eviction, if true\, modify internal algorithms to change
2053      * skew to force history store eviction to happen more aggressively.  This includes but is
2054      * not limited to not skewing newest\, not favoring leaf pages\, and modifying the eviction
2055      * score mechanism., a boolean flag; default \c false.}
2056      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2057      * log_retention, adjust log archiving to retain at least this number of log files\, ignored
2058      * if set to 0. (Warning: this option can remove log files required for recovery if no
2059      * checkpoints have yet been done and the number of log files exceeds the configured value.
2060      * As WiredTiger cannot detect the difference between a system that has not yet checkpointed
2061      * and one that will never checkpoint\, it might discard log files before any checkpoint is
2062      * done.)., an integer between 0 and 1024; default \c 0.}
2063      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2064      * realloc_exact, if true\, reallocation of memory will only provide the exact amount
2065      * requested.  This will help with spotting memory allocation issues more easily., a boolean
2066      * flag; default \c false.}
2067      * @config{&nbsp;&nbsp;&nbsp;&nbsp;rollback_error, return a
2068      * WT_ROLLBACK error from a transaction operation about every Nth operation to simulate a
2069      * collision., an integer between 0 and 10M; default \c 0.}
2070      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2071      * slow_checkpoint, if true\, slow down checkpoint creation by slowing down internal page
2072      * processing., a boolean flag; default \c false.}
2073      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2074      * table_logging, if true\, write transaction related information to the log for all
2075      * operations\, even operations for tables with logging turned off.  This setting introduces
2076      * a log format change that may break older versions of WiredTiger.  These operations are
2077      * informational and skipped in recovery., a boolean flag; default \c false.}
2078      * @config{ ),,}
2079      * @config{error_prefix, prefix string for error messages., a string; default empty.}
2080      * @config{eviction = (, eviction configuration options., a set of related configuration
2081      * options defined below.}
2082      * @config{&nbsp;&nbsp;&nbsp;&nbsp;threads_max, maximum number of
2083      * threads WiredTiger will start to help evict pages from cache.  The number of threads
2084      * started will vary depending on the current eviction load.  Each eviction worker thread
2085      * uses a session from the configured session_max., an integer between 1 and 20; default \c
2086      * 8.}
2087      * @config{&nbsp;&nbsp;&nbsp;&nbsp;threads_min, minimum number of threads WiredTiger
2088      * will start to help evict pages from cache.  The number of threads currently running will
2089      * vary depending on the current eviction load., an integer between 1 and 20; default \c 1.}
2090      * @config{ ),,}
2091      * @config{eviction_checkpoint_target, perform eviction at the beginning of checkpoints to
2092      * bring the dirty content in cache to this level.  It is a percentage of the cache size if
2093      * the value is within the range of 0 to 100 or an absolute size when greater than 100. The
2094      * value is not allowed to exceed the \c cache_size.  Ignored if set to zero., an integer
2095      * between 0 and 10TB; default \c 1.}
2096      * @config{eviction_dirty_target, perform eviction in worker threads when the cache contains
2097      * at least this much dirty content.  It is a percentage of the cache size if the value is
2098      * within the range of 1 to 100 or an absolute size when greater than 100. The value is not
2099      * allowed to exceed the \c cache_size., an integer between 1 and 10TB; default \c 5.}
2100      * @config{eviction_dirty_trigger, trigger application threads to perform eviction when the
2101      * cache contains at least this much dirty content.  It is a percentage of the cache size if
2102      * the value is within the range of 1 to 100 or an absolute size when greater than 100. The
2103      * value is not allowed to exceed the \c cache_size.  This setting only alters behavior if
2104      * it is lower than eviction_trigger., an integer between 1 and 10TB; default \c 20.}
2105      * @config{eviction_target, perform eviction in worker threads when the cache contains at
2106      * least this much content.  It is a percentage of the cache size if the value is within the
2107      * range of 10 to 100 or an absolute size when greater than 100. The value is not allowed to
2108      * exceed the \c cache_size., an integer between 10 and 10TB; default \c 80.}
2109      * @config{eviction_trigger, trigger application threads to perform eviction when the cache
2110      * contains at least this much content.  It is a percentage of the cache size if the value
2111      * is within the range of 10 to 100 or an absolute size when greater than 100. The value is
2112      * not allowed to exceed the \c cache_size., an integer between 10 and 10TB; default \c 95.}
2113      * @config{eviction_updates_target, perform eviction in worker threads when the cache
2114      * contains at least this many bytes of updates.  It is a percentage of the cache size if
2115      * the value is within the range of 0 to 100 or an absolute size when greater than 100.
2116      * Calculated as half of \c eviction_dirty_target by default.  The value is not allowed to
2117      * exceed the \c cache_size., an integer between 0 and 10TB; default \c 0.}
2118      * @config{eviction_updates_trigger, trigger application threads to perform eviction when
2119      * the cache contains at least this many bytes of updates.  It is a percentage of the cache
2120      * size if the value is within the range of 1 to 100 or an absolute size when greater than
2121      * 100\. Calculated as half of \c eviction_dirty_trigger by default.  The value is not
2122      * allowed to exceed the \c cache_size.  This setting only alters behavior if it is lower
2123      * than \c eviction_trigger., an integer between 0 and 10TB; default \c 0.}
2124      * @config{file_manager = (, control how file handles are managed., a set of related
2125      * configuration options defined below.}
2126      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2127      * close_handle_minimum, number of handles open before the file manager will look for
2128      * handles to close., an integer greater than or equal to 0; default \c 250.}
2129      * @config{&nbsp;&nbsp;&nbsp;&nbsp;close_idle_time, amount of time in seconds a file handle
2130      * needs to be idle before attempting to close it.  A setting of 0 means that idle handles
2131      * are not closed., an integer between 0 and 100000; default \c 30.}
2132      * @config{&nbsp;&nbsp;&nbsp;&nbsp;close_scan_interval, interval in seconds at which to
2133      * check for files that are inactive and close them., an integer between 1 and 100000;
2134      * default \c 10.}
2135      * @config{ ),,}
2136      * @config{history_store = (, history store configuration options., a set of related
2137      * configuration options defined below.}
2138      * @config{&nbsp;&nbsp;&nbsp;&nbsp;file_max, The
2139      * maximum number of bytes that WiredTiger is allowed to use for its history store
2140      * mechanism.  If the history store file exceeds this size\, a panic will be triggered.  The
2141      * default value means that the history store file is unbounded and may use as much space as
2142      * the filesystem will accommodate.  The minimum non-zero setting is 100MB., an integer
2143      * greater than or equal to 0; default \c 0.}
2144      * @config{ ),,}
2145      * @config{io_capacity = (, control how many bytes per second are written and read.
2146      * Exceeding the capacity results in throttling., a set of related configuration options
2147      * defined below.}
2148      * @config{&nbsp;&nbsp;&nbsp;&nbsp;total, number of bytes per second
2149      * available to all subsystems in total.  When set\, decisions about what subsystems are
2150      * throttled\, and in what proportion\, are made internally.  The minimum non-zero setting
2151      * is 1MB., an integer between 0 and 1TB; default \c 0.}
2152      * @config{ ),,}
2153      * @config{log = (, enable logging.  Enabling logging uses three sessions from the
2154      * configured session_max., a set of related configuration options defined below.}
2155      * @config{&nbsp;&nbsp;&nbsp;&nbsp;archive, automatically archive unneeded log files., a
2156      * boolean flag; default \c true.}
2157      * @config{&nbsp;&nbsp;&nbsp;&nbsp;os_cache_dirty_pct,
2158      * maximum dirty system buffer cache usage\, as a percentage of the log's \c file_max.  If
2159      * non-zero\, schedule writes for dirty blocks belonging to the log in the system buffer
2160      * cache after that percentage of the log has been written into the buffer cache without an
2161      * intervening file sync., an integer between 0 and 100; default \c 0.}
2162      * @config{&nbsp;&nbsp;&nbsp;&nbsp;prealloc, pre-allocate log files., a boolean flag;
2163      * default \c true.}
2164      * @config{&nbsp;&nbsp;&nbsp;&nbsp;zero_fill, manually write zeroes into
2165      * log files., a boolean flag; default \c false.}
2166      * @config{ ),,}
2167      * @config{lsm_manager = (, configure database wide options for LSM tree management.  The
2168      * LSM manager is started automatically the first time an LSM tree is opened.  The LSM
2169      * manager uses a session from the configured session_max., a set of related configuration
2170      * options defined below.}
2171      * @config{&nbsp;&nbsp;&nbsp;&nbsp;merge, merge LSM chunks where
2172      * possible., a boolean flag; default \c true.}
2173      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2174      * worker_thread_max, Configure a set of threads to manage merging LSM trees in the
2175      * database.  Each worker thread uses a session handle from the configured session_max., an
2176      * integer between 3 and 20; default \c 4.}
2177      * @config{ ),,}
2178      * @config{operation_timeout_ms, when non-zero\, a requested limit on the number of elapsed
2179      * real time milliseconds application threads will take to complete database operations.
2180      * Time is measured from the start of each WiredTiger API call.  There is no guarantee any
2181      * operation will not take longer than this amount of time.  If WiredTiger notices the limit
2182      * has been exceeded\, an operation may return a WT_ROLLBACK error.  Default is to have no
2183      * limit., an integer greater than or equal to 1; default \c 0.}
2184      * @config{operation_tracking = (, enable tracking of performance-critical functions.  See
2185      * @ref operation_tracking for more information., a set of related configuration options
2186      * defined below.}
2187      * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, enable operation tracking
2188      * subsystem., a boolean flag; default \c false.}
2189      * @config{&nbsp;&nbsp;&nbsp;&nbsp;path, the
2190      * name of a directory into which operation tracking files are written.  The directory must
2191      * already exist.  If the value is not an absolute path\, the path is relative to the
2192      * database home (see @ref absolute_path for more information)., a string; default \c ".".}
2193      * @config{ ),,}
2194      * @config{shared_cache = (, shared cache configuration options.  A database should
2195      * configure either a cache_size or a shared_cache not both.  Enabling a shared cache uses a
2196      * session from the configured session_max.  A shared cache can not have absolute values
2197      * configured for cache eviction settings., a set of related configuration options defined
2198      * below.}
2199      * @config{&nbsp;&nbsp;&nbsp;&nbsp;chunk, the granularity that a shared cache is
2200      * redistributed., an integer between 1MB and 10TB; default \c 10MB.}
2201      * @config{&nbsp;&nbsp;&nbsp;&nbsp;name, the name of a cache that is shared between
2202      * databases or \c "none" when no shared cache is configured., a string; default \c none.}
2203      * @config{&nbsp;&nbsp;&nbsp;&nbsp;quota, maximum size of cache this database can be
2204      * allocated from the shared cache.  Defaults to the entire shared cache size., an integer;
2205      * default \c 0.}
2206      * @config{&nbsp;&nbsp;&nbsp;&nbsp;reserve, amount of cache this database is
2207      * guaranteed to have available from the shared cache.  This setting is per database.
2208      * Defaults to the chunk size., an integer; default \c 0.}
2209      * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2210      * size, maximum memory to allocate for the shared cache.  Setting this will update the
2211      * value if one is already set., an integer between 1MB and 10TB; default \c 500MB.}
2212      * @config{ ),,}
2213      * @config{statistics, Maintain database statistics\, which may impact performance.
2214      * Choosing "all" maintains all statistics regardless of cost\, "fast" maintains a subset of
2215      * statistics that are relatively inexpensive\, "none" turns off all statistics.  The
2216      * "clear" configuration resets statistics after they are gathered\, where appropriate (for
2217      * example\, a cache size statistic is not cleared\, while the count of cursor insert
2218      * operations will be cleared). When "clear" is configured for the database\, gathered
2219      * statistics are reset each time a statistics cursor is used to gather statistics\, as well
2220      * as each time statistics are logged using the \c statistics_log configuration.  See @ref
2221      * statistics for more information., a list\, with values chosen from the following options:
2222      * \c "all"\, \c "cache_walk"\, \c "fast"\, \c "none"\, \c "clear"\, \c "tree_walk"; default
2223      * \c none.}
2224      * @config{statistics_log = (, log any statistics the database is configured to maintain\,
2225      * to a file.  See @ref statistics for more information.  Enabling the statistics log server
2226      * uses a session from the configured session_max., a set of related configuration options
2227      * defined below.}
2228      * @config{&nbsp;&nbsp;&nbsp;&nbsp;json, encode statistics in JSON format.,
2229      * a boolean flag; default \c false.}
2230      * @config{&nbsp;&nbsp;&nbsp;&nbsp;on_close, log
2231      * statistics on database close., a boolean flag; default \c false.}
2232      * @config{&nbsp;&nbsp;&nbsp;&nbsp;sources, if non-empty\, include statistics for the list
2233      * of data source URIs\, if they are open at the time of the statistics logging.  The list
2234      * may include URIs matching a single data source ("table:mytable")\, or a URI matching all
2235      * data sources of a particular type ("table:")., a list of strings; default empty.}
2236      * @config{&nbsp;&nbsp;&nbsp;&nbsp;timestamp, a timestamp prepended to each log record\, may
2237      * contain strftime conversion specifications\, when \c json is configured\, defaults to \c
2238      * "%Y-%m-%dT%H:%M:%S.000Z"., a string; default \c "%b %d %H:%M:%S".}
2239      * @config{&nbsp;&nbsp;&nbsp;&nbsp;wait, seconds to wait between each write of the log
2240      * records; setting this value above 0 configures statistics logging., an integer between 0
2241      * and 100000; default \c 0.}
2242      * @config{ ),,}
2243      * @config{tiered_storage = (, enable tiered storage.  Enabling tiered storage may use one
2244      * session from the configured session_max., a set of related configuration options defined
2245      * below.}
2246      * @config{&nbsp;&nbsp;&nbsp;&nbsp;local_retention, time in seconds to retain data
2247      * on tiered storage on the local tier for faster read access., an integer between 0 and
2248      * 10000; default \c 300.}
2249      * @config{&nbsp;&nbsp;&nbsp;&nbsp;object_target_size, the
2250      * approximate size of objects before creating them on the tiered storage tier., an integer
2251      * between 100K and 10TB; default \c 10M.}
2252      * @config{ ),,}
2253      * @config{verbose, enable messages for various events.  Options are given as a list\, such
2254      * as <code>"verbose=[evictserver\,read]"</code>., a list\, with values chosen from the
2255      * following options: \c "api"\, \c "backup"\, \c "block"\, \c "checkpoint"\, \c
2256      * "checkpoint_cleanup"\, \c "checkpoint_progress"\, \c "compact"\, \c "compact_progress"\,
2257      * \c "error_returns"\, \c "evict"\, \c "evict_stuck"\, \c "evictserver"\, \c "fileops"\, \c
2258      * "handleops"\, \c "log"\, \c "history_store"\, \c "history_store_activity"\, \c "lsm"\, \c
2259      * "lsm_manager"\, \c "metadata"\, \c "mutex"\, \c "overflow"\, \c "read"\, \c "reconcile"\,
2260      * \c "recovery"\, \c "recovery_progress"\, \c "rts"\, \c "salvage"\, \c "shared_cache"\, \c
2261      * "split"\, \c "temporary"\, \c "thread_group"\, \c "timestamp"\, \c "transaction"\, \c
2262      * "verify"\, \c "version"\, \c "write"; default \c [].}
2263      * @configend
2264      * @errors
2265      */
2266     int __F(reconfigure)(WT_CONNECTION *connection, const char *config);
2267 
2268     /*!
2269      * The home directory of the connection.
2270      *
2271      * @snippet ex_all.c Get the database home directory
2272      *
2273      * @param connection the connection handle
2274      * @returns a pointer to a string naming the home directory
2275      */
2276     const char *__F(get_home)(WT_CONNECTION *connection);
2277 
2278     /*!
2279      * Add configuration options for a method.  See
2280      * @ref custom_ds_config_add for more information.
2281      *
2282      * @snippet ex_all.c Configure method configuration
2283      *
2284      * @param connection the connection handle
2285      * @param method the method being configured
2286      * @param uri the object type or NULL for all object types
2287      * @param config the additional configuration's name and default value
2288      * @param type the additional configuration's type (must be one of
2289      * \c "boolean"\, \c "int", \c "list" or \c "string")
2290      * @param check the additional configuration check string, or NULL if
2291      * none
2292      * @errors
2293      */
2294     int __F(configure_method)(WT_CONNECTION *connection,
2295         const char *method, const char *uri,
2296         const char *config, const char *type, const char *check);
2297 
2298     /*!
2299      * Return if opening this handle created the database.
2300      *
2301      * @snippet ex_all.c Check if the database is newly created
2302      *
2303      * @param connection the connection handle
2304      * @returns false (zero) if the connection existed before the call to
2305      * ::wiredtiger_open, true (non-zero) if it was created by opening this
2306      * handle.
2307      */
2308     int __F(is_new)(WT_CONNECTION *connection);
2309 
2310     /*!
2311      * @name Session handles
2312      * @{
2313      */
2314     /*!
2315      * Open a session.
2316      *
2317      * @snippet ex_all.c Open a session
2318      *
2319      * @param connection the connection handle
2320      * @param event_handler An event handler. If <code>NULL</code>, the
2321      * connection's event handler is used. See @ref event_message_handling
2322      * for more information.
2323      * @configstart{WT_CONNECTION.open_session, see dist/api_data.py}
2324      * @config{cache_cursors, enable caching of cursors for reuse.  Any calls to
2325      * WT_CURSOR::close for a cursor created in this session will mark the cursor as cached and
2326      * keep it available to be reused for later calls to WT_SESSION::open_cursor.  Cached
2327      * cursors may be eventually closed.  This value is inherited from ::wiredtiger_open \c
2328      * cache_cursors., a boolean flag; default \c true.}
2329      * @config{ignore_cache_size, when set\, operations performed by this session ignore the
2330      * cache size and are not blocked when the cache is full.  Note that use of this option for
2331      * operations that create cache pressure can starve ordinary sessions that obey the cache
2332      * size., a boolean flag; default \c false.}
2333      * @config{isolation, the default isolation level for operations in this session., a
2334      * string\, chosen from the following options: \c "read-uncommitted"\, \c "read-committed"\,
2335      * \c "snapshot"; default \c snapshot.}
2336      * @configend
2337      * @param[out] sessionp the new session handle
2338      * @errors
2339      */
2340     int __F(open_session)(WT_CONNECTION *connection,
2341         WT_EVENT_HANDLER *event_handler, const char *config,
2342         WT_SESSION **sessionp);
2343     /*! @} */
2344 
2345     /*!
2346      * @name Transactions
2347      * @{
2348      */
2349     /*!
2350      * Query the global transaction timestamp state.
2351      *
2352      * @snippet ex_all.c query timestamp
2353      *
2354      * @param connection the connection handle
2355      * @param[out] hex_timestamp a buffer that will be set to the
2356      * hexadecimal encoding of the timestamp being queried.  Must be large
2357      * enough to hold a NUL terminated, hex-encoded 8B timestamp (17 bytes).
2358      * @configstart{WT_CONNECTION.query_timestamp, see dist/api_data.py}
2359      * @config{get, specify which timestamp to query: \c all_durable returns the largest
2360      * timestamp such that all timestamps up to that value have been made durable\, \c
2361      * last_checkpoint returns the timestamp of the most recent stable checkpoint\, \c oldest
2362      * returns the most recent \c oldest_timestamp set with WT_CONNECTION::set_timestamp\, \c
2363      * oldest_reader returns the minimum of the read timestamps of all active readers \c pinned
2364      * returns the minimum of the \c oldest_timestamp and the read timestamps of all active
2365      * readers\, \c recovery returns the timestamp of the most recent stable checkpoint taken
2366      * prior to a shutdown and \c stable returns the most recent \c stable_timestamp set with
2367      * WT_CONNECTION::set_timestamp.  See @ref transaction_timestamps., a string\, chosen from
2368      * the following options: \c "all_durable"\, \c "last_checkpoint"\, \c "oldest"\, \c
2369      * "oldest_reader"\, \c "pinned"\, \c "recovery"\, \c "stable"; default \c all_durable.}
2370      * @configend
2371      * @errors
2372      * If there is no matching timestamp (e.g., if this method is called
2373      * before timestamps are used) ::WT_NOTFOUND will be returned.
2374      */
2375     int __F(query_timestamp)(
2376         WT_CONNECTION *connection, char *hex_timestamp, const char *config);
2377 
2378     /*!
2379      * Set a global transaction timestamp.
2380      *
2381      * @snippet ex_all.c set commit timestamp
2382      *
2383      * @snippet ex_all.c set oldest timestamp
2384      *
2385      * @snippet ex_all.c set stable timestamp
2386      *
2387      * @param connection the connection handle
2388      * @configstart{WT_CONNECTION.set_timestamp, see dist/api_data.py}
2389      * @config{commit_timestamp, (deprecated) reset the maximum commit timestamp tracked by
2390      * WiredTiger.  This will cause future calls to WT_CONNECTION::query_timestamp to ignore
2391      * commit timestamps greater than the specified value until the next commit moves the
2392      * tracked commit timestamp forwards.  This is only intended for use where the application
2393      * is rolling back locally committed transactions.  The supplied value must not be older
2394      * than the current oldest and stable timestamps.  See @ref transaction_timestamps., a
2395      * string; default empty.}
2396      * @config{durable_timestamp, reset the maximum durable timestamp tracked by WiredTiger.
2397      * This will cause future calls to WT_CONNECTION::query_timestamp to ignore durable
2398      * timestamps greater than the specified value until the next durable timestamp moves the
2399      * tracked durable timestamp forwards.  This is only intended for use where the application
2400      * is rolling back locally committed transactions.  The supplied value must not be older
2401      * than the current oldest and stable timestamps.  See @ref transaction_timestamps., a
2402      * string; default empty.}
2403      * @config{force, set timestamps even if they violate normal ordering requirements.  For
2404      * example allow the \c oldest_timestamp to move backwards., a boolean flag; default \c
2405      * false.}
2406      * @config{oldest_timestamp, future commits and queries will be no earlier than the
2407      * specified timestamp.  Supplied values must be monotonically increasing\, any attempt to
2408      * set the value to older than the current is silently ignored.  The supplied value must not
2409      * be newer than the current stable timestamp.  See @ref transaction_timestamps., a string;
2410      * default empty.}
2411      * @config{stable_timestamp, checkpoints will not include commits that are newer than the
2412      * specified timestamp in tables configured with \c log=(enabled=false). Supplied values
2413      * must be monotonically increasing\, any attempt to set the value to older than the current
2414      * is silently ignored.  The supplied value must not be older than the current oldest
2415      * timestamp.  See @ref transaction_timestamps., a string; default empty.}
2416      * @configend
2417      * @errors
2418      */
2419     int __F(set_timestamp)(
2420         WT_CONNECTION *connection, const char *config);
2421 
2422     /*!
2423      * Rollback in-memory non-logged state to an earlier point in time.
2424      *
2425      * This method uses a timestamp to define the rollback point, and requires the application
2426      * use timestamps, the stable_timestamp have been set via a call to
2427      * WT_CONNECTION::set_timestamp, and a checkpoint operating on the last stable timestamp
2428      * to have completed. Any updates to checkpoint durable tables that are more recent than
2429      * the stable timestamp are removed.
2430      *
2431      * This method requires that there are no active operations for the duration of the call.
2432      *
2433      * Any updates made to logged tables will not be rolled back. Any updates made without an
2434      * associated timestamp will not be rolled back. See @ref transaction_timestamps.
2435      *
2436      * @snippet ex_all.c rollback to stable
2437      *
2438      * @param connection the connection handle
2439      * @configempty{WT_CONNECTION.rollback_to_stable, see dist/api_data.py}
2440      * @errors
2441      */
2442     int __F(rollback_to_stable)(
2443         WT_CONNECTION *connection, const char *config);
2444 
2445     /*! @} */
2446 
2447     /*!
2448      * @name Extensions
2449      * @{
2450      */
2451     /*!
2452      * Load an extension.
2453      *
2454      * @snippet ex_all.c Load an extension
2455      *
2456      * @param connection the connection handle
2457      * @param path the filename of the extension module, or \c "local" to
2458      * search the current application binary for the initialization
2459      * function, see @ref extensions for more details.
2460      * @configstart{WT_CONNECTION.load_extension, see dist/api_data.py}
2461      * @config{config, configuration string passed to the entry point of the extension as its
2462      * WT_CONFIG_ARG argument., a string; default empty.}
2463      * @config{early_load, whether this extension should be loaded at the beginning of
2464      * ::wiredtiger_open.  Only applicable to extensions loaded via the wiredtiger_open
2465      * configurations string., a boolean flag; default \c false.}
2466      * @config{entry, the entry point of the extension\, called to initialize the extension when
2467      * it is loaded.  The signature of the function must match ::wiredtiger_extension_init., a
2468      * string; default \c wiredtiger_extension_init.}
2469      * @config{terminate, an optional function in the extension that is called before the
2470      * extension is unloaded during WT_CONNECTION::close.  The signature of the function must
2471      * match ::wiredtiger_extension_terminate., a string; default \c
2472      * wiredtiger_extension_terminate.}
2473      * @configend
2474      * @errors
2475      */
2476     int __F(load_extension)(WT_CONNECTION *connection,
2477         const char *path, const char *config);
2478 
2479     /*!
2480      * Add a custom data source.  See @ref custom_data_sources for more
2481      * information.
2482      *
2483      * The application must first implement the WT_DATA_SOURCE interface
2484      * and then register the implementation with WiredTiger:
2485      *
2486      * @snippet ex_data_source.c WT_DATA_SOURCE register
2487      *
2488      * @param connection the connection handle
2489      * @param prefix the URI prefix for this data source, e.g., "file:"
2490      * @param data_source the application-supplied implementation of
2491      *  WT_DATA_SOURCE to manage this data source.
2492      * @configempty{WT_CONNECTION.add_data_source, see dist/api_data.py}
2493      * @errors
2494      */
2495     int __F(add_data_source)(WT_CONNECTION *connection, const char *prefix,
2496         WT_DATA_SOURCE *data_source, const char *config);
2497 
2498     /*!
2499      * Add a custom collation function.
2500      *
2501      * The application must first implement the WT_COLLATOR interface and
2502      * then register the implementation with WiredTiger:
2503      *
2504      * @snippet ex_all.c WT_COLLATOR register
2505      *
2506      * @param connection the connection handle
2507      * @param name the name of the collation to be used in calls to
2508      *  WT_SESSION::create, may not be \c "none"
2509      * @param collator the application-supplied collation handler
2510      * @configempty{WT_CONNECTION.add_collator, see dist/api_data.py}
2511      * @errors
2512      */
2513     int __F(add_collator)(WT_CONNECTION *connection,
2514         const char *name, WT_COLLATOR *collator, const char *config);
2515 
2516     /*!
2517      * Add a compression function.
2518      *
2519      * The application must first implement the WT_COMPRESSOR interface
2520      * and then register the implementation with WiredTiger:
2521      *
2522      * @snippet nop_compress.c WT_COMPRESSOR initialization structure
2523      *
2524      * @snippet nop_compress.c WT_COMPRESSOR initialization function
2525      *
2526      * @param connection the connection handle
2527      * @param name the name of the compression function to be used in calls
2528      *  to WT_SESSION::create, may not be \c "none"
2529      * @param compressor the application-supplied compression handler
2530      * @configempty{WT_CONNECTION.add_compressor, see dist/api_data.py}
2531      * @errors
2532      */
2533     int __F(add_compressor)(WT_CONNECTION *connection,
2534         const char *name, WT_COMPRESSOR *compressor, const char *config);
2535 
2536     /*!
2537      * Add an encryption function.
2538      *
2539      * The application must first implement the WT_ENCRYPTOR interface
2540      * and then register the implementation with WiredTiger:
2541      *
2542      * @snippet nop_encrypt.c WT_ENCRYPTOR initialization structure
2543      *
2544      * @snippet nop_encrypt.c WT_ENCRYPTOR initialization function
2545      *
2546      * @param connection the connection handle
2547      * @param name the name of the encryption function to be used in calls
2548      *  to WT_SESSION::create, may not be \c "none"
2549      * @param encryptor the application-supplied encryption handler
2550      * @configempty{WT_CONNECTION.add_encryptor, see dist/api_data.py}
2551      * @errors
2552      */
2553     int __F(add_encryptor)(WT_CONNECTION *connection,
2554         const char *name, WT_ENCRYPTOR *encryptor, const char *config);
2555 
2556     /*!
2557      * Add a custom extractor for index keys or column groups.
2558      *
2559      * The application must first implement the WT_EXTRACTOR interface and
2560      * then register the implementation with WiredTiger:
2561      *
2562      * @snippet ex_all.c WT_EXTRACTOR register
2563      *
2564      * @param connection the connection handle
2565      * @param name the name of the extractor to be used in calls to
2566      *  WT_SESSION::create, may not be \c "none"
2567      * @param extractor the application-supplied extractor
2568      * @configempty{WT_CONNECTION.add_extractor, see dist/api_data.py}
2569      * @errors
2570      */
2571     int __F(add_extractor)(WT_CONNECTION *connection, const char *name,
2572         WT_EXTRACTOR *extractor, const char *config);
2573 
2574     /*!
2575      * Configure a custom file system.
2576      *
2577      * This method can only be called from an early loaded extension
2578      * module. The application must first implement the WT_FILE_SYSTEM
2579      * interface and then register the implementation with WiredTiger:
2580      *
2581      * @snippet ex_file_system.c WT_FILE_SYSTEM register
2582      *
2583      * @param connection the connection handle
2584      * @param fs the populated file system structure
2585      * @configempty{WT_CONNECTION.set_file_system, see dist/api_data.py}
2586      * @errors
2587      */
2588     int __F(set_file_system)(
2589         WT_CONNECTION *connection, WT_FILE_SYSTEM *fs, const char *config);
2590 
2591 #if !defined(DOXYGEN)
2592 #if !defined(SWIG)
2593     /*!
2594      * Add a storage source implementation.
2595      *
2596      * The application must first implement the WT_STORAGE_SOURCE
2597      * interface and then register the implementation with WiredTiger:
2598      *
2599      * @snippet ex_storage_source.c WT_STORAGE_SOURCE register
2600      *
2601      * @param connection the connection handle
2602      * @param name the name of the storage source implementation
2603      * @param storage_source the populated storage source structure
2604      * @configempty{WT_CONNECTION.add_storage_source, see dist/api_data.py}
2605      * @errors
2606      */
2607     int __F(add_storage_source)(WT_CONNECTION *connection, const char *name,
2608         WT_STORAGE_SOURCE *storage_source, const char *config);
2609 #endif
2610 
2611     /*!
2612      * Get a storage source implementation.
2613      *
2614      * Look up a storage source by name.
2615      *
2616      * @snippet ex_storage_source.c WT_STORAGE_SOURCE register
2617      *
2618      * @param connection the connection handle
2619      * @param name the name of the storage source implementation
2620      * @param storage_source the storage source structure
2621      * @errors
2622      */
2623     int __F(get_storage_source)(WT_CONNECTION *connection, const char *name,
2624         WT_STORAGE_SOURCE **storage_sourcep);
2625 #endif
2626 
2627     /*!
2628      * Return a reference to the WiredTiger extension functions.
2629      *
2630      * @snippet ex_data_source.c WT_EXTENSION_API declaration
2631      *
2632      * @param wt_conn the WT_CONNECTION handle
2633      * @returns a reference to a WT_EXTENSION_API structure.
2634      */
2635     WT_EXTENSION_API *__F(get_extension_api)(WT_CONNECTION *wt_conn);
2636     /*! @} */
2637 };
2638 
2639 /*!
2640  * Open a connection to a database.
2641  *
2642  * @snippet ex_all.c Open a connection
2643  *
2644  * @param home The path to the database home directory.  See @ref home
2645  * for more information.
2646  * @param event_handler An event handler. If <code>NULL</code>, a default
2647  * event handler is installed that writes error messages to stderr. See
2648  * @ref event_message_handling for more information.
2649  * @configstart{wiredtiger_open, see dist/api_data.py}
2650  * @config{buffer_alignment, in-memory alignment (in bytes) for buffers used for I/O. The default
2651  * value of -1 indicates a platform-specific alignment value should be used (4KB on Linux systems
2652  * when direct I/O is configured\, zero elsewhere)., an integer between -1 and 1MB; default \c -1.}
2653  * @config{builtin_extension_config, A structure where the keys are the names of builtin extensions
2654  * and the values are passed to WT_CONNECTION::load_extension as the \c config parameter (for
2655  * example\, <code>builtin_extension_config={zlib={compression_level=3}}</code>)., a string; default
2656  * empty.}
2657  * @config{cache_cursors, enable caching of cursors for reuse.  This is the default value for any
2658  * sessions created\, and can be overridden in configuring \c cache_cursors in
2659  * WT_CONNECTION.open_session., a boolean flag; default \c true.}
2660  * @config{cache_max_wait_ms, the maximum number of milliseconds an application thread will wait for
2661  * space to be available in cache before giving up.  Default will wait forever., an integer greater
2662  * than or equal to 0; default \c 0.}
2663  * @config{cache_overhead, assume the heap allocator overhead is the specified percentage\, and
2664  * adjust the cache usage by that amount (for example\, if there is 10GB of data in cache\, a
2665  * percentage of 10 means WiredTiger treats this as 11GB). This value is configurable because
2666  * different heap allocators have different overhead and different workloads will have different
2667  * heap allocation sizes and patterns\, therefore applications may need to adjust this value based
2668  * on allocator choice and behavior in measured workloads., an integer between 0 and 30; default \c
2669  * 8.}
2670  * @config{cache_size, maximum heap memory to allocate for the cache.  A database should configure
2671  * either \c cache_size or \c shared_cache but not both., an integer between 1MB and 10TB; default
2672  * \c 100MB.}
2673  * @config{checkpoint = (, periodically checkpoint the database.  Enabling the checkpoint server
2674  * uses a session from the configured session_max., a set of related configuration options defined
2675  * below.}
2676  * @config{&nbsp;&nbsp;&nbsp;&nbsp;log_size, wait for this amount of log record bytes to be
2677  * written to the log between each checkpoint.  If non-zero\, this value will use a minimum of the
2678  * log file size.  A database can configure both log_size and wait to set an upper bound for
2679  * checkpoints; setting this value above 0 configures periodic checkpoints., an integer between 0
2680  * and 2GB; default \c 0.}
2681  * @config{&nbsp;&nbsp;&nbsp;&nbsp;wait, seconds to wait between each
2682  * checkpoint; setting this value above 0 configures periodic checkpoints., an integer between 0 and
2683  * 100000; default \c 0.}
2684  * @config{ ),,}
2685  * @config{checkpoint_sync, flush files to stable storage when closing or writing checkpoints., a
2686  * boolean flag; default \c true.}
2687  * @config{compatibility = (, set compatibility version of database.  Changing the compatibility
2688  * version requires that there are no active operations for the duration of the call., a set of
2689  * related configuration options defined below.}
2690  * @config{&nbsp;&nbsp;&nbsp;&nbsp;release,
2691  * compatibility release version string., a string; default empty.}
2692  * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2693  * require_max, required maximum compatibility version of existing data files.  Must be greater than
2694  * or equal to any release version set in the \c release setting.  Has no effect if creating the
2695  * database., a string; default empty.}
2696  * @config{&nbsp;&nbsp;&nbsp;&nbsp;require_min, required
2697  * minimum compatibility version of existing data files.  Must be less than or equal to any release
2698  * version set in the \c release setting.  Has no effect if creating the database., a string;
2699  * default empty.}
2700  * @config{ ),,}
2701  * @config{config_base, write the base configuration file if creating the database.  If \c false in
2702  * the config passed directly to ::wiredtiger_open\, will ignore any existing base configuration
2703  * file in addition to not creating one.  See @ref config_base for more information., a boolean
2704  * flag; default \c true.}
2705  * @config{create, create the database if it does not exist., a boolean flag; default \c false.}
2706  * @config{debug_mode = (, control the settings of various extended debugging features., a set of
2707  * related configuration options defined below.}
2708  * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2709  * checkpoint_retention, adjust log archiving to retain the log records of this number of
2710  * checkpoints.  Zero or one means perform normal archiving., an integer between 0 and 1024; default
2711  * \c 0.}
2712  * @config{&nbsp;&nbsp;&nbsp;&nbsp;corruption_abort, if true\, dump the core in the
2713  * diagnostic mode on encountering the data corruption., a boolean flag; default \c true.}
2714  * @config{&nbsp;&nbsp;&nbsp;&nbsp;cursor_copy, if true\, use the system allocator to make a copy of
2715  * any data returned by a cursor operation and return the copy instead.  The copy is freed on the
2716  * next cursor operation.  This allows memory sanitizers to detect inappropriate references to
2717  * memory owned by cursors., a boolean flag; default \c false.}
2718  * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2719  * eviction, if true\, modify internal algorithms to change skew to force history store eviction to
2720  * happen more aggressively.  This includes but is not limited to not skewing newest\, not favoring
2721  * leaf pages\, and modifying the eviction score mechanism., a boolean flag; default \c false.}
2722  * @config{&nbsp;&nbsp;&nbsp;&nbsp;log_retention, adjust log archiving to retain at least this
2723  * number of log files\, ignored if set to 0. (Warning: this option can remove log files required
2724  * for recovery if no checkpoints have yet been done and the number of log files exceeds the
2725  * configured value.  As WiredTiger cannot detect the difference between a system that has not yet
2726  * checkpointed and one that will never checkpoint\, it might discard log files before any
2727  * checkpoint is done.)., an integer between 0 and 1024; default \c 0.}
2728  * @config{&nbsp;&nbsp;&nbsp;&nbsp;realloc_exact, if true\, reallocation of memory will only provide
2729  * the exact amount requested.  This will help with spotting memory allocation issues more easily.,
2730  * a boolean flag; default \c false.}
2731  * @config{&nbsp;&nbsp;&nbsp;&nbsp;rollback_error, return a
2732  * WT_ROLLBACK error from a transaction operation about every Nth operation to simulate a
2733  * collision., an integer between 0 and 10M; default \c 0.}
2734  * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2735  * slow_checkpoint, if true\, slow down checkpoint creation by slowing down internal page
2736  * processing., a boolean flag; default \c false.}
2737  * @config{&nbsp;&nbsp;&nbsp;&nbsp;table_logging, if
2738  * true\, write transaction related information to the log for all operations\, even operations for
2739  * tables with logging turned off.  This setting introduces a log format change that may break older
2740  * versions of WiredTiger.  These operations are informational and skipped in recovery., a boolean
2741  * flag; default \c false.}
2742  * @config{ ),,}
2743  * @config{direct_io, Use \c O_DIRECT on POSIX systems\, and \c FILE_FLAG_NO_BUFFERING on Windows to
2744  * access files.  Options are given as a list\, such as <code>"direct_io=[data]"</code>. Configuring
2745  * \c direct_io requires care\, see @ref tuning_system_buffer_cache_direct_io for important
2746  * warnings.  Including \c "data" will cause WiredTiger data files to use direct I/O\, including \c
2747  * "log" will cause WiredTiger log files to use direct I/O\, and including \c "checkpoint" will
2748  * cause WiredTiger data files opened at a checkpoint (i.e: read-only) to use direct I/O. \c
2749  * direct_io should be combined with \c write_through to get the equivalent of \c O_DIRECT on
2750  * Windows., a list\, with values chosen from the following options: \c "checkpoint"\, \c "data"\,
2751  * \c "log"; default empty.}
2752  * @config{encryption = (, configure an encryptor for system wide metadata and logs.  If a system
2753  * wide encryptor is set\, it is also used for encrypting data files and tables\, unless encryption
2754  * configuration is explicitly set for them when they are created with WT_SESSION::create., a set of
2755  * related configuration options defined below.}
2756  * @config{&nbsp;&nbsp;&nbsp;&nbsp;keyid, An
2757  * identifier that identifies a unique instance of the encryptor.  It is stored in clear text\, and
2758  * thus is available when the wiredtiger database is reopened.  On the first use of a (name\, keyid)
2759  * combination\, the WT_ENCRYPTOR::customize function is called with the keyid as an argument., a
2760  * string; default empty.}
2761  * @config{&nbsp;&nbsp;&nbsp;&nbsp;name, Permitted values are \c "none" or
2762  * custom encryption engine name created with WT_CONNECTION::add_encryptor.  See @ref encryption for
2763  * more information., a string; default \c none.}
2764  * @config{&nbsp;&nbsp;&nbsp;&nbsp;secretkey, A
2765  * string that is passed to the WT_ENCRYPTOR::customize function.  It is never stored in clear
2766  * text\, so must be given to any subsequent ::wiredtiger_open calls to reopen the database.  It
2767  * must also be provided to any "wt" commands used with this database., a string; default empty.}
2768  * @config{ ),,}
2769  * @config{error_prefix, prefix string for error messages., a string; default empty.}
2770  * @config{eviction = (, eviction configuration options., a set of related configuration options
2771  * defined below.}
2772  * @config{&nbsp;&nbsp;&nbsp;&nbsp;threads_max, maximum number of threads WiredTiger
2773  * will start to help evict pages from cache.  The number of threads started will vary depending on
2774  * the current eviction load.  Each eviction worker thread uses a session from the configured
2775  * session_max., an integer between 1 and 20; default \c 8.}
2776  * @config{&nbsp;&nbsp;&nbsp;&nbsp;
2777  * threads_min, minimum number of threads WiredTiger will start to help evict pages from cache.  The
2778  * number of threads currently running will vary depending on the current eviction load., an integer
2779  * between 1 and 20; default \c 1.}
2780  * @config{ ),,}
2781  * @config{eviction_checkpoint_target, perform eviction at the beginning of checkpoints to bring the
2782  * dirty content in cache to this level.  It is a percentage of the cache size if the value is
2783  * within the range of 0 to 100 or an absolute size when greater than 100. The value is not allowed
2784  * to exceed the \c cache_size.  Ignored if set to zero., an integer between 0 and 10TB; default \c
2785  * 1.}
2786  * @config{eviction_dirty_target, perform eviction in worker threads when the cache contains at
2787  * least this much dirty content.  It is a percentage of the cache size if the value is within the
2788  * range of 1 to 100 or an absolute size when greater than 100. The value is not allowed to exceed
2789  * the \c cache_size., an integer between 1 and 10TB; default \c 5.}
2790  * @config{eviction_dirty_trigger, trigger application threads to perform eviction when the cache
2791  * contains at least this much dirty content.  It is a percentage of the cache size if the value is
2792  * within the range of 1 to 100 or an absolute size when greater than 100. The value is not allowed
2793  * to exceed the \c cache_size.  This setting only alters behavior if it is lower than
2794  * eviction_trigger., an integer between 1 and 10TB; default \c 20.}
2795  * @config{eviction_target, perform eviction in worker threads when the cache contains at least this
2796  * much content.  It is a percentage of the cache size if the value is within the range of 10 to 100
2797  * or an absolute size when greater than 100. The value is not allowed to exceed the \c cache_size.,
2798  * an integer between 10 and 10TB; default \c 80.}
2799  * @config{eviction_trigger, trigger application threads to perform eviction when the cache contains
2800  * at least this much content.  It is a percentage of the cache size if the value is within the
2801  * range of 10 to 100 or an absolute size when greater than 100. The value is not allowed to exceed
2802  * the \c cache_size., an integer between 10 and 10TB; default \c 95.}
2803  * @config{eviction_updates_target, perform eviction in worker threads when the cache contains at
2804  * least this many bytes of updates.  It is a percentage of the cache size if the value is within
2805  * the range of 0 to 100 or an absolute size when greater than 100. Calculated as half of \c
2806  * eviction_dirty_target by default.  The value is not allowed to exceed the \c cache_size., an
2807  * integer between 0 and 10TB; default \c 0.}
2808  * @config{eviction_updates_trigger, trigger application threads to perform eviction when the cache
2809  * contains at least this many bytes of updates.  It is a percentage of the cache size if the value
2810  * is within the range of 1 to 100 or an absolute size when greater than 100\. Calculated as half of
2811  * \c eviction_dirty_trigger by default.  The value is not allowed to exceed the \c cache_size.
2812  * This setting only alters behavior if it is lower than \c eviction_trigger., an integer between 0
2813  * and 10TB; default \c 0.}
2814  * @config{exclusive, fail if the database already exists\, generally used with the \c create
2815  * option., a boolean flag; default \c false.}
2816  * @config{extensions, list of shared library extensions to load (using dlopen). Any values
2817  * specified to a library extension are passed to WT_CONNECTION::load_extension as the \c config
2818  * parameter (for example\, <code>extensions=(/path/ext.so={entry=my_entry})</code>)., a list of
2819  * strings; default empty.}
2820  * @config{file_close_sync, control whether to flush modified files to storage independent of a
2821  * global checkpoint when closing file handles to acquire exclusive access to a table.  If set to
2822  * false\, and logging is disabled\, API calls that require exclusive access to tables will return
2823  * EBUSY if there have been changes made to the table since the last global checkpoint.  When
2824  * logging is enabled\, the value for <code>file_close_sync</code> has no effect\, and\, modified
2825  * file is always flushed to storage when closing file handles to acquire exclusive access to the
2826  * table., a boolean flag; default \c true.}
2827  * @config{file_extend, file extension configuration.  If set\, extend files of the set type in
2828  * allocations of the set size\, instead of a block at a time as each new block is written.  For
2829  * example\, <code>file_extend=(data=16MB)</code>. If set to 0\, disable the file extension for the
2830  * set type.  For log files\, the allowed range is between 100KB and 2GB; values larger than the
2831  * configured maximum log size and the default config would extend log files in allocations of the
2832  * maximum log file size., a list\, with values chosen from the following options: \c "data"\, \c
2833  * "log"; default empty.}
2834  * @config{file_manager = (, control how file handles are managed., a set of related configuration
2835  * options defined below.}
2836  * @config{&nbsp;&nbsp;&nbsp;&nbsp;close_handle_minimum, number of handles
2837  * open before the file manager will look for handles to close., an integer greater than or equal to
2838  * 0; default \c 250.}
2839  * @config{&nbsp;&nbsp;&nbsp;&nbsp;close_idle_time, amount of time in seconds a
2840  * file handle needs to be idle before attempting to close it.  A setting of 0 means that idle
2841  * handles are not closed., an integer between 0 and 100000; default \c 30.}
2842  * @config{&nbsp;&nbsp;&nbsp;&nbsp;close_scan_interval, interval in seconds at which to check for
2843  * files that are inactive and close them., an integer between 1 and 100000; default \c 10.}
2844  * @config{ ),,}
2845  * @config{hash = (, manage resources around hash bucket arrays.  All values must be a power of two.
2846  * Note that setting large values can significantly increase memory usage inside WiredTiger., a set
2847  * of related configuration options defined below.}
2848  * @config{&nbsp;&nbsp;&nbsp;&nbsp;buckets,
2849  * configure the number of hash buckets for most system hash arrays., an integer between 64 and
2850  * 65536; default \c 512.}
2851  * @config{&nbsp;&nbsp;&nbsp;&nbsp;dhandle_buckets, configure the number of
2852  * hash buckets for hash arrays relating to data handles., an integer between 64 and 65536; default
2853  * \c 512.}
2854  * @config{ ),,}
2855  * @config{history_store = (, history store configuration options., a set of related configuration
2856  * options defined below.}
2857  * @config{&nbsp;&nbsp;&nbsp;&nbsp;file_max, The maximum number of bytes
2858  * that WiredTiger is allowed to use for its history store mechanism.  If the history store file
2859  * exceeds this size\, a panic will be triggered.  The default value means that the history store
2860  * file is unbounded and may use as much space as the filesystem will accommodate.  The minimum
2861  * non-zero setting is 100MB., an integer greater than or equal to 0; default \c 0.}
2862  * @config{ ),,}
2863  * @config{in_memory, keep data in-memory only.  See @ref in_memory for more information., a boolean
2864  * flag; default \c false.}
2865  * @config{io_capacity = (, control how many bytes per second are written and read.  Exceeding the
2866  * capacity results in throttling., a set of related configuration options defined below.}
2867  * @config{&nbsp;&nbsp;&nbsp;&nbsp;total, number of bytes per second available to all subsystems in
2868  * total.  When set\, decisions about what subsystems are throttled\, and in what proportion\, are
2869  * made internally.  The minimum non-zero setting is 1MB., an integer between 0 and 1TB; default \c
2870  * 0.}
2871  * @config{ ),,}
2872  * @config{log = (, enable logging.  Enabling logging uses three sessions from the configured
2873  * session_max., a set of related configuration options defined below.}
2874  * @config{&nbsp;&nbsp;&nbsp;&nbsp;archive, automatically archive unneeded log files., a boolean
2875  * flag; default \c true.}
2876  * @config{&nbsp;&nbsp;&nbsp;&nbsp;compressor, configure a compressor for
2877  * log records.  Permitted values are \c "none" or custom compression engine name created with
2878  * WT_CONNECTION::add_compressor.  If WiredTiger has builtin support for \c "lz4"\, \c "snappy"\, \c
2879  * "zlib" or \c "zstd" compression\, these names are also available.  See @ref compression for more
2880  * information., a string; default \c none.}
2881  * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, enable logging
2882  * subsystem., a boolean flag; default \c false.}
2883  * @config{&nbsp;&nbsp;&nbsp;&nbsp;file_max, the
2884  * maximum size of log files., an integer between 100KB and 2GB; default \c 100MB.}
2885  * @config{&nbsp;&nbsp;&nbsp;&nbsp;os_cache_dirty_pct, maximum dirty system buffer cache usage\, as
2886  * a percentage of the log's \c file_max.  If non-zero\, schedule writes for dirty blocks belonging
2887  * to the log in the system buffer cache after that percentage of the log has been written into the
2888  * buffer cache without an intervening file sync., an integer between 0 and 100; default \c 0.}
2889  * @config{&nbsp;&nbsp;&nbsp;&nbsp;path, the name of a directory into which log files are written.
2890  * The directory must already exist.  If the value is not an absolute path\, the path is relative to
2891  * the database home (see @ref absolute_path for more information)., a string; default \c ".".}
2892  * @config{&nbsp;&nbsp;&nbsp;&nbsp;prealloc, pre-allocate log files., a boolean flag; default \c
2893  * true.}
2894  * @config{&nbsp;&nbsp;&nbsp;&nbsp;recover, run recovery or error if recovery needs to run
2895  * after an unclean shutdown., a string\, chosen from the following options: \c "error"\, \c "on";
2896  * default \c on.}
2897  * @config{&nbsp;&nbsp;&nbsp;&nbsp;zero_fill, manually write zeroes into log files.,
2898  * a boolean flag; default \c false.}
2899  * @config{ ),,}
2900  * @config{lsm_manager = (, configure database wide options for LSM tree management.  The LSM
2901  * manager is started automatically the first time an LSM tree is opened.  The LSM manager uses a
2902  * session from the configured session_max., a set of related configuration options defined below.}
2903  * @config{&nbsp;&nbsp;&nbsp;&nbsp;merge, merge LSM chunks where possible., a boolean flag; default
2904  * \c true.}
2905  * @config{&nbsp;&nbsp;&nbsp;&nbsp;worker_thread_max, Configure a set of threads to manage
2906  * merging LSM trees in the database.  Each worker thread uses a session handle from the configured
2907  * session_max., an integer between 3 and 20; default \c 4.}
2908  * @config{ ),,}
2909  * @config{mmap, Use memory mapping when accessing files in a read-only mode., a boolean flag;
2910  * default \c true.}
2911  * @config{mmap_all, Use memory mapping to read and write all data files\, may not be configured
2912  * with direct I/O., a boolean flag; default \c false.}
2913  * @config{multiprocess, permit sharing between processes (will automatically start an RPC server
2914  * for primary processes and use RPC for secondary processes). <b>Not yet supported in
2915  * WiredTiger</b>., a boolean flag; default \c false.}
2916  * @config{operation_timeout_ms, when non-zero\, a requested limit on the number of elapsed real
2917  * time milliseconds application threads will take to complete database operations.  Time is
2918  * measured from the start of each WiredTiger API call.  There is no guarantee any operation will
2919  * not take longer than this amount of time.  If WiredTiger notices the limit has been exceeded\, an
2920  * operation may return a WT_ROLLBACK error.  Default is to have no limit., an integer greater than
2921  * or equal to 1; default \c 0.}
2922  * @config{operation_tracking = (, enable tracking of performance-critical functions.  See @ref
2923  * operation_tracking for more information., a set of related configuration options defined below.}
2924  * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, enable operation tracking subsystem., a boolean flag;
2925  * default \c false.}
2926  * @config{&nbsp;&nbsp;&nbsp;&nbsp;path, the name of a directory into which
2927  * operation tracking files are written.  The directory must already exist.  If the value is not an
2928  * absolute path\, the path is relative to the database home (see @ref absolute_path for more
2929  * information)., a string; default \c ".".}
2930  * @config{ ),,}
2931  * @config{readonly, open connection in read-only mode.  The database must exist.  All methods that
2932  * may modify a database are disabled.  See @ref readonly for more information., a boolean flag;
2933  * default \c false.}
2934  * @config{salvage, open connection and salvage any WiredTiger-owned database and log files that it
2935  * detects as corrupted.  This API should only be used after getting an error return of
2936  * WT_TRY_SALVAGE. Salvage rebuilds files in place\, overwriting existing files.  We recommend
2937  * making a backup copy of all files with the WiredTiger prefix prior to passing this flag., a
2938  * boolean flag; default \c false.}
2939  * @config{session_max, maximum expected number of sessions (including server threads)., an integer
2940  * greater than or equal to 1; default \c 100.}
2941  * @config{shared_cache = (, shared cache configuration options.  A database should configure either
2942  * a cache_size or a shared_cache not both.  Enabling a shared cache uses a session from the
2943  * configured session_max.  A shared cache can not have absolute values configured for cache
2944  * eviction settings., a set of related configuration options defined below.}
2945  * @config{&nbsp;&nbsp;&nbsp;&nbsp;chunk, the granularity that a shared cache is redistributed., an
2946  * integer between 1MB and 10TB; default \c 10MB.}
2947  * @config{&nbsp;&nbsp;&nbsp;&nbsp;name, the name of
2948  * a cache that is shared between databases or \c "none" when no shared cache is configured., a
2949  * string; default \c none.}
2950  * @config{&nbsp;&nbsp;&nbsp;&nbsp;quota, maximum size of cache this
2951  * database can be allocated from the shared cache.  Defaults to the entire shared cache size., an
2952  * integer; default \c 0.}
2953  * @config{&nbsp;&nbsp;&nbsp;&nbsp;reserve, amount of cache this database is
2954  * guaranteed to have available from the shared cache.  This setting is per database.  Defaults to
2955  * the chunk size., an integer; default \c 0.}
2956  * @config{&nbsp;&nbsp;&nbsp;&nbsp;size, maximum memory
2957  * to allocate for the shared cache.  Setting this will update the value if one is already set., an
2958  * integer between 1MB and 10TB; default \c 500MB.}
2959  * @config{ ),,}
2960  * @config{statistics, Maintain database statistics\, which may impact performance.  Choosing "all"
2961  * maintains all statistics regardless of cost\, "fast" maintains a subset of statistics that are
2962  * relatively inexpensive\, "none" turns off all statistics.  The "clear" configuration resets
2963  * statistics after they are gathered\, where appropriate (for example\, a cache size statistic is
2964  * not cleared\, while the count of cursor insert operations will be cleared). When "clear" is
2965  * configured for the database\, gathered statistics are reset each time a statistics cursor is used
2966  * to gather statistics\, as well as each time statistics are logged using the \c statistics_log
2967  * configuration.  See @ref statistics for more information., a list\, with values chosen from the
2968  * following options: \c "all"\, \c "cache_walk"\, \c "fast"\, \c "none"\, \c "clear"\, \c
2969  * "tree_walk"; default \c none.}
2970  * @config{statistics_log = (, log any statistics the database is configured to maintain\, to a
2971  * file.  See @ref statistics for more information.  Enabling the statistics log server uses a
2972  * session from the configured session_max., a set of related configuration options defined below.}
2973  * @config{&nbsp;&nbsp;&nbsp;&nbsp;json, encode statistics in JSON format., a boolean flag; default
2974  * \c false.}
2975  * @config{&nbsp;&nbsp;&nbsp;&nbsp;on_close, log statistics on database close., a boolean
2976  * flag; default \c false.}
2977  * @config{&nbsp;&nbsp;&nbsp;&nbsp;path, the name of a directory into which
2978  * statistics files are written.  The directory must already exist.  If the value is not an absolute
2979  * path\, the path is relative to the database home (see @ref absolute_path for more information).,
2980  * a string; default \c ".".}
2981  * @config{&nbsp;&nbsp;&nbsp;&nbsp;sources, if non-empty\, include
2982  * statistics for the list of data source URIs\, if they are open at the time of the statistics
2983  * logging.  The list may include URIs matching a single data source ("table:mytable")\, or a URI
2984  * matching all data sources of a particular type ("table:")., a list of strings; default empty.}
2985  * @config{&nbsp;&nbsp;&nbsp;&nbsp;timestamp, a timestamp prepended to each log record\, may contain
2986  * strftime conversion specifications\, when \c json is configured\, defaults to \c
2987  * "%Y-%m-%dT%H:%M:%S.000Z"., a string; default \c "%b %d %H:%M:%S".}
2988  * @config{&nbsp;&nbsp;&nbsp;&nbsp;wait, seconds to wait between each write of the log records;
2989  * setting this value above 0 configures statistics logging., an integer between 0 and 100000;
2990  * default \c 0.}
2991  * @config{ ),,}
2992  * @config{transaction_sync = (, how to sync log records when the transaction commits., a set of
2993  * related configuration options defined below.}
2994  * @config{&nbsp;&nbsp;&nbsp;&nbsp;enabled, whether to
2995  * sync the log on every commit by default\, can be overridden by the \c sync setting to
2996  * WT_SESSION::commit_transaction., a boolean flag; default \c false.}
2997  * @config{&nbsp;&nbsp;&nbsp;&nbsp;method, the method used to ensure log records are stable on
2998  * disk\, see @ref tune_durability for more information., a string\, chosen from the following
2999  * options: \c "dsync"\, \c "fsync"\, \c "none"; default \c fsync.}
3000  * @config{ ),,}
3001  * @config{use_environment, use the \c WIREDTIGER_CONFIG and \c WIREDTIGER_HOME environment
3002  * variables if the process is not running with special privileges.  See @ref home for more
3003  * information., a boolean flag; default \c true.}
3004  * @config{use_environment_priv, use the \c WIREDTIGER_CONFIG and \c WIREDTIGER_HOME environment
3005  * variables even if the process is running with special privileges.  See @ref home for more
3006  * information., a boolean flag; default \c false.}
3007  * @config{verbose, enable messages for various events.  Options are given as a list\, such as
3008  * <code>"verbose=[evictserver\,read]"</code>., a list\, with values chosen from the following
3009  * options: \c "api"\, \c "backup"\, \c "block"\, \c "checkpoint"\, \c "checkpoint_cleanup"\, \c
3010  * "checkpoint_progress"\, \c "compact"\, \c "compact_progress"\, \c "error_returns"\, \c "evict"\,
3011  * \c "evict_stuck"\, \c "evictserver"\, \c "fileops"\, \c "handleops"\, \c "log"\, \c
3012  * "history_store"\, \c "history_store_activity"\, \c "lsm"\, \c "lsm_manager"\, \c "metadata"\, \c
3013  * "mutex"\, \c "overflow"\, \c "read"\, \c "reconcile"\, \c "recovery"\, \c "recovery_progress"\,
3014  * \c "rts"\, \c "salvage"\, \c "shared_cache"\, \c "split"\, \c "temporary"\, \c "thread_group"\,
3015  * \c "timestamp"\, \c "transaction"\, \c "verify"\, \c "version"\, \c "write"; default \c [].}
3016  * @config{verify_metadata, open connection and verify any WiredTiger metadata.  This API allows
3017  * verification and detection of corruption in WiredTiger metadata., a boolean flag; default \c
3018  * false.}
3019  * @config{write_through, Use \c FILE_FLAG_WRITE_THROUGH on Windows to write to files.  Ignored on
3020  * non-Windows systems.  Options are given as a list\, such as <code>"write_through=[data]"</code>.
3021  * Configuring \c write_through requires care\, see @ref tuning_system_buffer_cache_direct_io for
3022  * important warnings.  Including \c "data" will cause WiredTiger data files to write through
3023  * cache\, including \c "log" will cause WiredTiger log files to write through cache.  \c
3024  * write_through should be combined with \c direct_io to get the equivalent of POSIX \c O_DIRECT on
3025  * Windows., a list\, with values chosen from the following options: \c "data"\, \c "log"; default
3026  * empty.}
3027  * @configend
3028  * Additionally, if files named \c WiredTiger.config or \c WiredTiger.basecfg
3029  * appear in the WiredTiger home directory, they are read for configuration
3030  * values (see @ref config_file and @ref config_base for details).
3031  * See @ref config_order for ordering of the configuration mechanisms.
3032  * @param[out] connectionp A pointer to the newly opened connection handle
3033  * @errors
3034  */
3035 int wiredtiger_open(const char *home,
3036     WT_EVENT_HANDLER *event_handler, const char *config,
3037     WT_CONNECTION **connectionp) WT_ATTRIBUTE_LIBRARY_VISIBLE;
3038 
3039 /*!
3040  * Return information about a WiredTiger error as a string (see
3041  * WT_SESSION::strerror for a thread-safe API).
3042  *
3043  * @snippet ex_all.c Display an error
3044  *
3045  * @param error a return value from a WiredTiger, ISO C, or POSIX standard API
3046  * @returns a string representation of the error
3047  */
3048 const char *wiredtiger_strerror(int error) WT_ATTRIBUTE_LIBRARY_VISIBLE;
3049 
3050 /*!
3051  * The interface implemented by applications to handle error, informational and
3052  * progress messages.  Entries set to NULL are ignored and the default handlers
3053  * will continue to be used.
3054  */
3055 struct __wt_event_handler {
3056     /*!
3057      * Callback to handle error messages; by default, error messages are
3058      * written to the stderr stream. See @ref event_message_handling for
3059      * more information.
3060      *
3061      * Errors that require the application to exit and restart will have
3062      * their \c error value set to \c WT_PANIC. The application can exit
3063      * immediately when \c WT_PANIC is passed to an event handler, there
3064      * is no reason to return into WiredTiger.
3065      *
3066      * Event handler returns are not ignored: if the handler returns
3067      * non-zero, the error may cause the WiredTiger function posting the
3068      * event to fail, and may even cause operation or library failure.
3069      *
3070      * @param session the WiredTiger session handle in use when the error
3071      * was generated. The handle may have been created by the application
3072      * or automatically by WiredTiger.
3073      * @param error a return value from a WiredTiger, ISO C, or
3074      * POSIX standard API, which can be converted to a string using
3075      * WT_SESSION::strerror
3076      * @param message an error string
3077      */
3078     int (*handle_error)(WT_EVENT_HANDLER *handler,
3079         WT_SESSION *session, int error, const char *message);
3080 
3081     /*!
3082      * Callback to handle informational messages; by default, informational
3083      * messages are written to the stdout stream. See
3084      * @ref event_message_handling for more information.
3085      *
3086      * Message handler returns are not ignored: if the handler returns
3087      * non-zero, the error may cause the WiredTiger function posting the
3088      * event to fail, and may even cause operation or library failure.
3089      *
3090      * @param session the WiredTiger session handle in use when the message
3091      * was generated. The handle may have been created by the application
3092      * or automatically by WiredTiger.
3093      * @param message an informational string
3094      */
3095     int (*handle_message)(WT_EVENT_HANDLER *handler,
3096         WT_SESSION *session, const char *message);
3097 
3098     /*!
3099      * Callback to handle progress messages; by default, progress messages
3100      * are not written. See @ref event_message_handling for more
3101      * information.
3102      *
3103      * Progress handler returns are not ignored: if the handler returns
3104      * non-zero, the error may cause the WiredTiger function posting the
3105      * event to fail, and may even cause operation or library failure.
3106      *
3107      * @param session the WiredTiger session handle in use when the
3108      * progress message was generated. The handle may have been created by
3109      * the application or automatically by WiredTiger.
3110      * @param operation a string representation of the operation
3111      * @param progress a counter
3112      */
3113     int (*handle_progress)(WT_EVENT_HANDLER *handler,
3114         WT_SESSION *session, const char *operation, uint64_t progress);
3115 
3116     /*!
3117      * Callback to handle automatic close of a WiredTiger handle.
3118      *
3119      * Close handler returns are not ignored: if the handler returns
3120      * non-zero, the error may cause the WiredTiger function posting the
3121      * event to fail, and may even cause operation or library failure.
3122      *
3123      * @param session The session handle that is being closed if the
3124      * cursor parameter is NULL.
3125      * @param cursor The cursor handle that is being closed, or NULL if
3126      * it is a session handle being closed.
3127      */
3128     int (*handle_close)(WT_EVENT_HANDLER *handler,
3129         WT_SESSION *session, WT_CURSOR *cursor);
3130 };
3131 
3132 /*!
3133  * @name Data packing and unpacking
3134  * @{
3135  */
3136 
3137 /*!
3138  * Pack a structure into a buffer.
3139  *
3140  * See @ref packing for a description of the permitted format strings.
3141  *
3142  * @section pack_examples Packing Examples
3143  *
3144  * For example, the string <code>"iSh"</code> will pack a 32-bit integer
3145  * followed by a NUL-terminated string, followed by a 16-bit integer.  The
3146  * default, big-endian encoding will be used, with no alignment.  This could be
3147  * used in C as follows:
3148  *
3149  * @snippet ex_all.c Pack fields into a buffer
3150  *
3151  * Then later, the values can be unpacked as follows:
3152  *
3153  * @snippet ex_all.c Unpack fields from a buffer
3154  *
3155  * @param session the session handle
3156  * @param buffer a pointer to a packed byte array
3157  * @param len the number of valid bytes in the buffer
3158  * @param format the data format, see @ref packing
3159  * @errors
3160  */
3161 int wiredtiger_struct_pack(WT_SESSION *session,
3162     void *buffer, size_t len, const char *format, ...)
3163     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3164 
3165 /*!
3166  * Calculate the size required to pack a structure.
3167  *
3168  * Note that for variable-sized fields including variable-sized strings and
3169  * integers, the calculated sized merely reflects the expected sizes specified
3170  * in the format string itself.
3171  *
3172  * @snippet ex_all.c Get the packed size
3173  *
3174  * @param session the session handle
3175  * @param lenp a location where the number of bytes needed for the
3176  * matching call to ::wiredtiger_struct_pack is returned
3177  * @param format the data format, see @ref packing
3178  * @errors
3179  */
3180 int wiredtiger_struct_size(WT_SESSION *session,
3181     size_t *lenp, const char *format, ...) WT_ATTRIBUTE_LIBRARY_VISIBLE;
3182 
3183 /*!
3184  * Unpack a structure from a buffer.
3185  *
3186  * Reverse of ::wiredtiger_struct_pack: gets values out of a
3187  * packed byte string.
3188  *
3189  * @snippet ex_all.c Unpack fields from a buffer
3190  *
3191  * @param session the session handle
3192  * @param buffer a pointer to a packed byte array
3193  * @param len the number of valid bytes in the buffer
3194  * @param format the data format, see @ref packing
3195  * @errors
3196  */
3197 int wiredtiger_struct_unpack(WT_SESSION *session,
3198     const void *buffer, size_t len, const char *format, ...)
3199     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3200 
3201 #if !defined(SWIG)
3202 
3203 /*!
3204  * Streaming interface to packing.
3205  *
3206  * This allows applications to pack or unpack records one field at a time.
3207  * This is an opaque handle returned by ::wiredtiger_pack_start or
3208  * ::wiredtiger_unpack_start.  It must be closed with ::wiredtiger_pack_close.
3209  */
3210 typedef struct __wt_pack_stream WT_PACK_STREAM;
3211 
3212 /*!
3213  * Start a packing operation into a buffer with the given format string.  This
3214  * should be followed by a series of calls to ::wiredtiger_pack_item,
3215  * ::wiredtiger_pack_int, ::wiredtiger_pack_str or ::wiredtiger_pack_uint
3216  * to fill in the values.
3217  *
3218  * @param session the session handle
3219  * @param format the data format, see @ref packing
3220  * @param buffer a pointer to memory to hold the packed data
3221  * @param size the size of the buffer
3222  * @param[out] psp the new packing stream handle
3223  * @errors
3224  */
3225 int wiredtiger_pack_start(WT_SESSION *session,
3226     const char *format, void *buffer, size_t size, WT_PACK_STREAM **psp)
3227     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3228 
3229 /*!
3230  * Start an unpacking operation from a buffer with the given format string.
3231  * This should be followed by a series of calls to ::wiredtiger_unpack_item,
3232  * ::wiredtiger_unpack_int, ::wiredtiger_unpack_str or ::wiredtiger_unpack_uint
3233  * to retrieve the packed values.
3234  *
3235  * @param session the session handle
3236  * @param format the data format, see @ref packing
3237  * @param buffer a pointer to memory holding the packed data
3238  * @param size the size of the buffer
3239  * @param[out] psp the new packing stream handle
3240  * @errors
3241  */
3242 int wiredtiger_unpack_start(WT_SESSION *session,
3243     const char *format, const void *buffer, size_t size, WT_PACK_STREAM **psp)
3244     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3245 
3246 /*!
3247  * Close a packing stream.
3248  *
3249  * @param ps the packing stream handle
3250  * @param[out] usedp the number of bytes in the buffer used by the stream
3251  * @errors
3252  */
3253 int wiredtiger_pack_close(WT_PACK_STREAM *ps, size_t *usedp)
3254     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3255 
3256 /*!
3257  * Pack an item into a packing stream.
3258  *
3259  * @param ps the packing stream handle
3260  * @param item an item to pack
3261  * @errors
3262  */
3263 int wiredtiger_pack_item(WT_PACK_STREAM *ps, WT_ITEM *item)
3264     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3265 
3266 /*!
3267  * Pack a signed integer into a packing stream.
3268  *
3269  * @param ps the packing stream handle
3270  * @param i a signed integer to pack
3271  * @errors
3272  */
3273 int wiredtiger_pack_int(WT_PACK_STREAM *ps, int64_t i)
3274     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3275 
3276 /*!
3277  * Pack a string into a packing stream.
3278  *
3279  * @param ps the packing stream handle
3280  * @param s a string to pack
3281  * @errors
3282  */
3283 int wiredtiger_pack_str(WT_PACK_STREAM *ps, const char *s)
3284     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3285 
3286 /*!
3287  * Pack an unsigned integer into a packing stream.
3288  *
3289  * @param ps the packing stream handle
3290  * @param u an unsigned integer to pack
3291  * @errors
3292  */
3293 int wiredtiger_pack_uint(WT_PACK_STREAM *ps, uint64_t u)
3294     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3295 
3296 /*!
3297  * Unpack an item from a packing stream.
3298  *
3299  * @param ps the packing stream handle
3300  * @param item an item to unpack
3301  * @errors
3302  */
3303 int wiredtiger_unpack_item(WT_PACK_STREAM *ps, WT_ITEM *item)
3304     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3305 
3306 /*!
3307  * Unpack a signed integer from a packing stream.
3308  *
3309  * @param ps the packing stream handle
3310  * @param[out] ip the unpacked signed integer
3311  * @errors
3312  */
3313 int wiredtiger_unpack_int(WT_PACK_STREAM *ps, int64_t *ip)
3314     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3315 
3316 /*!
3317  * Unpack a string from a packing stream.
3318  *
3319  * @param ps the packing stream handle
3320  * @param[out] sp the unpacked string
3321  * @errors
3322  */
3323 int wiredtiger_unpack_str(WT_PACK_STREAM *ps, const char **sp)
3324     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3325 
3326 /*!
3327  * Unpack an unsigned integer from a packing stream.
3328  *
3329  * @param ps the packing stream handle
3330  * @param[out] up the unpacked unsigned integer
3331  * @errors
3332  */
3333 int wiredtiger_unpack_uint(WT_PACK_STREAM *ps, uint64_t *up)
3334     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3335 /*! @} */
3336 
3337 /*!
3338  * @name Configuration strings
3339  * @{
3340  */
3341 
3342 /*!
3343  * The configuration information returned by the WiredTiger configuration
3344  * parsing functions in the WT_EXTENSION_API and the public API.
3345  */
3346 struct __wt_config_item {
3347     /*!
3348      * The value of a configuration string.
3349      *
3350      * Regardless of the type of the configuration string (boolean, int,
3351      * list or string), the \c str field will reference the value of the
3352      * configuration string.
3353      *
3354      * The bytes referenced by \c str are <b>not</b> nul-terminated,
3355      * use the \c len field instead of a terminating nul byte.
3356      */
3357     const char *str;
3358 
3359     /*! The number of bytes in the value referenced by \c str. */
3360     size_t len;
3361 
3362     /*!
3363      * The numeric value of a configuration boolean or integer.
3364      *
3365      * If the configuration string's value is "true" or "false", the
3366      * \c val field will be set to 1 (true), or 0 (false).
3367      *
3368      * If the configuration string can be legally interpreted as an integer,
3369      * using the strtoll function rules as specified in ISO/IEC 9899:1990
3370      * ("ISO C90"), that integer will be stored in the \c val field.
3371      */
3372     int64_t val;
3373 
3374     /*! Permitted values of the \c type field. */
3375     enum {
3376         /*! A string value with quotes stripped. */
3377         WT_CONFIG_ITEM_STRING,
3378         /*! A boolean literal ("true" or "false"). */
3379         WT_CONFIG_ITEM_BOOL,
3380         /*! An unquoted identifier: a string value without quotes. */
3381         WT_CONFIG_ITEM_ID,
3382         /*! A numeric value. */
3383         WT_CONFIG_ITEM_NUM,
3384         /*! A nested structure or list, including brackets. */
3385         WT_CONFIG_ITEM_STRUCT
3386     }
3387     /*!
3388      * The type of value determined by the parser.  In all cases,
3389      * the \c str and \c len fields are set.
3390      */
3391     type;
3392 };
3393 
3394 #if !defined(SWIG) && !defined(DOXYGEN)
3395 /*!
3396  * Validate a configuration string for a WiredTiger API.
3397  * This API is outside the scope of a WiredTiger connection handle, since
3398  * applications may need to validate configuration strings prior to calling
3399  * ::wiredtiger_open.
3400  * @param session the session handle (may be \c NULL if the database not yet
3401  * opened).
3402  * @param event_handler An event handler (used if \c session is \c NULL; if both
3403  * \c session and \c event_handler are \c NULL, error messages will be written
3404  * to stderr).
3405  * @param name the WiredTiger function or method to validate.
3406  * @param config the configuration string being parsed.
3407  * @returns zero for success, non-zero to indicate an error.
3408  *
3409  * @snippet ex_all.c Validate a configuration string
3410  */
3411 int wiredtiger_config_validate(WT_SESSION *session,
3412     WT_EVENT_HANDLER *event_handler, const char *name, const char *config)
3413     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3414 
3415 /*
3416  * Validate a configuration string for a WiredTiger test program.
3417  */
3418 int wiredtiger_test_config_validate(WT_SESSION *session,
3419     WT_EVENT_HANDLER *event_handler, const char *name, const char *config)
3420     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3421 #endif
3422 
3423 /*!
3424  * Create a handle that can be used to parse or create configuration strings
3425  * compatible with WiredTiger APIs.
3426  * This API is outside the scope of a WiredTiger connection handle, since
3427  * applications may need to generate configuration strings prior to calling
3428  * ::wiredtiger_open.
3429  * @param session the session handle to be used for error reporting (if NULL,
3430  *  error messages will be written to stderr).
3431  * @param config the configuration string being parsed. The string must
3432  *  remain valid for the lifetime of the parser handle.
3433  * @param len the number of valid bytes in \c config
3434  * @param[out] config_parserp A pointer to the newly opened handle
3435  * @errors
3436  *
3437  * @snippet ex_config_parse.c Create a configuration parser
3438  */
3439 int wiredtiger_config_parser_open(WT_SESSION *session,
3440     const char *config, size_t len, WT_CONFIG_PARSER **config_parserp)
3441     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3442 
3443 /*!
3444  * A handle that can be used to search and traverse configuration strings
3445  * compatible with WiredTiger APIs.
3446  * To parse the contents of a list or nested configuration string use a new
3447  * configuration parser handle based on the content of the ::WT_CONFIG_ITEM
3448  * retrieved from the parent configuration string.
3449  *
3450  * @section config_parse_examples Configuration String Parsing examples
3451  *
3452  * This could be used in C to create a configuration parser as follows:
3453  *
3454  * @snippet ex_config_parse.c Create a configuration parser
3455  *
3456  * Once the parser has been created the content can be queried directly:
3457  *
3458  * @snippet ex_config_parse.c get
3459  *
3460  * Or the content can be traversed linearly:
3461  *
3462  * @snippet ex_config_parse.c next
3463  *
3464  * Nested configuration values can be queried using a shorthand notation:
3465  *
3466  * @snippet ex_config_parse.c nested get
3467  *
3468  * Nested configuration values can be traversed using multiple
3469  * ::WT_CONFIG_PARSER handles:
3470  *
3471  * @snippet ex_config_parse.c nested traverse
3472  */
3473 struct __wt_config_parser {
3474 
3475     /*!
3476      * Close the configuration scanner releasing any resources.
3477      *
3478      * @param config_parser the configuration parser handle
3479      * @errors
3480      *
3481      */
3482     int __F(close)(WT_CONFIG_PARSER *config_parser);
3483 
3484     /*!
3485      * Return the next key/value pair.
3486      *
3487      * If an item has no explicitly assigned value, the item will be
3488      * returned in \c key and the \c value will be set to the boolean
3489      * \c "true" value.
3490      *
3491      * @param config_parser the configuration parser handle
3492      * @param key the returned key
3493      * @param value the returned value
3494      * @errors
3495      * When iteration would pass the end of the configuration string
3496      * ::WT_NOTFOUND will be returned.
3497      */
3498     int __F(next)(WT_CONFIG_PARSER *config_parser,
3499         WT_CONFIG_ITEM *key, WT_CONFIG_ITEM *value);
3500 
3501     /*!
3502      * Return the value of an item in the configuration string.
3503      *
3504      * @param config_parser the configuration parser handle
3505      * @param key configuration key string
3506      * @param value the returned value
3507      * @errors
3508      *
3509      */
3510     int __F(get)(WT_CONFIG_PARSER *config_parser,
3511         const char *key, WT_CONFIG_ITEM *value);
3512 };
3513 
3514 /*! @} */
3515 
3516 /*!
3517  * @name Support functions
3518  * @anchor support_functions
3519  * @{
3520  */
3521 
3522 /*!
3523  * Return a pointer to a function that calculates a CRC32C checksum.
3524  *
3525  * The WiredTiger library CRC32C checksum function uses hardware support where
3526  * available, else it falls back to a software implementation.
3527  *
3528  * @snippet ex_all.c Checksum a buffer
3529  *
3530  * @returns a pointer to a function that takes a buffer and length and returns
3531  * the CRC32C checksum
3532  */
3533 uint32_t (*wiredtiger_crc32c_func(void))(const void *, size_t)
3534     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3535 
3536 #endif /* !defined(SWIG) */
3537 
3538 /*!
3539  * Calculate a set of WT_MODIFY operations to represent an update.
3540  * This call will calculate a set of modifications to an old value that produce
3541  * the new value.  If more modifications are required than fit in the array
3542  * passed in by the caller, or if more bytes have changed than the \c maxdiff
3543  * parameter, the call will fail.  The matching algorithm is approximate, so it
3544  * may fail and return WT_NOTFOUND if a matching set of WT_MODIFY operations
3545  * is not found.
3546  *
3547  * The \c maxdiff parameter bounds how much work will be done searching for a
3548  * match: to ensure a match is found, it may need to be set larger than actual
3549  * number of bytes that differ between the old and new values.  In particular,
3550  * repeated patterns of bytes in the values can lead to suboptimal matching,
3551  * and matching ranges less than 64 bytes long will not be detected.
3552  *
3553  * If the call succeeds, the WT_MODIFY operations will point into \c newv,
3554  * which must remain valid until WT_CURSOR::modify is called.
3555  *
3556  * @snippet ex_all.c Calculate a modify operation
3557  *
3558  * @param session the current WiredTiger session (may be NULL)
3559  * @param oldv old value
3560  * @param newv new value
3561  * @param maxdiff maximum bytes difference
3562  * @param[out] entries array of modifications producing the new value
3563  * @param[in,out] nentriesp size of \c entries array passed in,
3564  *  set to the number of entries used
3565  * @errors
3566  */
3567 int wiredtiger_calc_modify(WT_SESSION *session,
3568     const WT_ITEM *oldv, const WT_ITEM *newv,
3569     size_t maxdiff, WT_MODIFY *entries, int *nentriesp)
3570     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3571 
3572 /*!
3573  * Get version information.
3574  *
3575  * @snippet ex_all.c Get the WiredTiger library version #1
3576  * @snippet ex_all.c Get the WiredTiger library version #2
3577  *
3578  * @param majorp a location where the major version number is returned
3579  * @param minorp a location where the minor version number is returned
3580  * @param patchp a location where the patch version number is returned
3581  * @returns a string representation of the version
3582  */
3583 const char *wiredtiger_version(int *majorp, int *minorp, int *patchp)
3584     WT_ATTRIBUTE_LIBRARY_VISIBLE;
3585 
3586 /*! @} */
3587 
3588 /*******************************************
3589  * Error returns
3590  *******************************************/
3591 /*!
3592  * @name Error returns
3593  * Most functions and methods in WiredTiger return an integer code indicating
3594  * whether the operation succeeded or failed.  A return of zero indicates
3595  * success, all non-zero return values indicate some kind of failure.
3596  *
3597  * WiredTiger reserves all values from -31,800 to -31,999 as possible error
3598  * return values.  WiredTiger may also return C99/POSIX error codes such as
3599  * \c ENOMEM, \c EINVAL and \c ENOTSUP, with the usual meanings.
3600  *
3601  * The following are all of the WiredTiger-specific error returns:
3602  * @{
3603  */
3604 /*
3605  * DO NOT EDIT: automatically built by dist/api_err.py.
3606  * Error return section: BEGIN
3607  */
3608 /*!
3609  * Conflict between concurrent operations.
3610  * This error is generated when an operation cannot be completed due to a
3611  * conflict with concurrent operations.  The operation may be retried; if a
3612  * transaction is in progress, it should be rolled back and the operation
3613  * retried in a new transaction.
3614  */
3615 #define WT_ROLLBACK (-31800)
3616 /*!
3617  * Attempt to insert an existing key.
3618  * This error is generated when the application attempts to insert a record with
3619  * the same key as an existing record without the 'overwrite' configuration to
3620  * WT_SESSION::open_cursor.
3621  */
3622 #define WT_DUPLICATE_KEY    (-31801)
3623 /*!
3624  * Non-specific WiredTiger error.
3625  * This error is returned when an error is not covered by a specific error
3626  * return.
3627  */
3628 #define WT_ERROR    (-31802)
3629 /*!
3630  * Item not found.
3631  * This error indicates an operation did not find a value to return.  This
3632  * includes cursor search and other operations where no record matched the
3633  * cursor's search key such as WT_CURSOR::update or WT_CURSOR::remove.
3634  */
3635 #define WT_NOTFOUND (-31803)
3636 /*!
3637  * WiredTiger library panic.
3638  * This error indicates an underlying problem that requires a database restart.
3639  * The application may exit immediately, no further WiredTiger calls are
3640  * required (and further calls will themselves immediately fail).
3641  */
3642 #define WT_PANIC    (-31804)
3643 /*! @cond internal */
3644 /*! Restart the operation (internal). */
3645 #define WT_RESTART  (-31805)
3646 /*! @endcond */
3647 /*!
3648  * Recovery must be run to continue.
3649  * This error is generated when wiredtiger_open is configured to return an error
3650  * if recovery is required to use the database.
3651  */
3652 #define WT_RUN_RECOVERY (-31806)
3653 /*!
3654  * Operation would overflow cache.
3655  * This error is only generated when wiredtiger_open is configured to run in-
3656  * memory, and an insert or update operation requires more than the configured
3657  * cache size to complete, or when an application thread fails to do eviction
3658  * within cache_max_wait_ms. The operation may be retried; if a transaction is
3659  * in progress, it should be rolled back and the operation retried in a new
3660  * transaction.
3661  */
3662 #define WT_CACHE_FULL   (-31807)
3663 /*!
3664  * Conflict with a prepared update.
3665  * This error is generated when the application attempts to update an already
3666  * updated record which is in prepared state. An updated record will be in
3667  * prepared state, when the transaction that performed the update is in prepared
3668  * state.
3669  */
3670 #define WT_PREPARE_CONFLICT (-31808)
3671 /*!
3672  * Database corruption detected.
3673  * This error is generated when corruption is detected in an on-disk file.
3674  * During normal operations, this may occur in rare circumstances as a result of
3675  * a system crash. The application may choose to salvage the file or retry
3676  * wiredtiger_open with the 'salvage=true' configuration setting.
3677  */
3678 #define WT_TRY_SALVAGE  (-31809)
3679 /*
3680  * Error return section: END
3681  * DO NOT EDIT: automatically built by dist/api_err.py.
3682  */
3683 /*! @} */
3684 
3685 #ifndef DOXYGEN
3686 #define WT_DEADLOCK WT_ROLLBACK     /* Backward compatibility */
3687 #endif
3688 
3689 /*! @} */
3690 
3691 /*!
3692  * @defgroup wt_ext WiredTiger Extension API
3693  * The functions and interfaces applications use to customize and extend the
3694  * behavior of WiredTiger.
3695  * @{
3696  */
3697 
3698 /*******************************************
3699  * Forward structure declarations for the extension API
3700  *******************************************/
3701 struct __wt_config_arg; typedef struct __wt_config_arg WT_CONFIG_ARG;
3702 
3703 /*!
3704  * The interface implemented by applications to provide custom ordering of
3705  * records.
3706  *
3707  * Applications register their implementation with WiredTiger by calling
3708  * WT_CONNECTION::add_collator.  See @ref custom_collators for more
3709  * information.
3710  *
3711  * @snippet ex_extending.c add collator nocase
3712  *
3713  * @snippet ex_extending.c add collator prefix10
3714  */
3715 struct __wt_collator {
3716     /*!
3717      * Callback to compare keys.
3718      *
3719      * @param[out] cmp set to -1 if <code>key1 < key2</code>,
3720      *  0 if <code>key1 == key2</code>,
3721      *  1 if <code>key1 > key2</code>.
3722      * @returns zero for success, non-zero to indicate an error.
3723      *
3724      * @snippet ex_all.c Implement WT_COLLATOR
3725      *
3726      * @snippet ex_extending.c case insensitive comparator
3727      *
3728      * @snippet ex_extending.c n character comparator
3729      */
3730     int (*compare)(WT_COLLATOR *collator, WT_SESSION *session,
3731         const WT_ITEM *key1, const WT_ITEM *key2, int *cmp);
3732 
3733     /*!
3734      * If non-NULL, this callback is called to customize the collator
3735      * for each data source.  If the callback returns a non-NULL
3736      * collator, that instance is used instead of this one for all
3737      * comparisons.
3738      */
3739     int (*customize)(WT_COLLATOR *collator, WT_SESSION *session,
3740         const char *uri, WT_CONFIG_ITEM *passcfg, WT_COLLATOR **customp);
3741 
3742     /*!
3743      * If non-NULL a callback performed when the data source is closed
3744      * for customized extractors otherwise when the database is closed.
3745      *
3746      * The WT_COLLATOR::terminate callback is intended to allow cleanup,
3747      * the handle will not be subsequently accessed by WiredTiger.
3748      */
3749     int (*terminate)(WT_COLLATOR *collator, WT_SESSION *session);
3750 };
3751 
3752 /*!
3753  * The interface implemented by applications to provide custom compression.
3754  *
3755  * Compressors must implement the WT_COMPRESSOR interface: the
3756  * WT_COMPRESSOR::compress and WT_COMPRESSOR::decompress callbacks must be
3757  * specified, and WT_COMPRESSOR::pre_size is optional.  To build your own
3758  * compressor, use one of the compressors in \c ext/compressors as a template:
3759  * \c ext/nop_compress is a simple compressor that passes through data
3760  * unchanged, and is a reasonable starting point.
3761  *
3762  * Applications register their implementation with WiredTiger by calling
3763  * WT_CONNECTION::add_compressor.
3764  *
3765  * @snippet nop_compress.c WT_COMPRESSOR initialization structure
3766  * @snippet nop_compress.c WT_COMPRESSOR initialization function
3767  */
3768 struct __wt_compressor {
3769     /*!
3770      * Callback to compress a chunk of data.
3771      *
3772      * WT_COMPRESSOR::compress takes a source buffer and a destination
3773      * buffer, by default of the same size.  If the callback can compress
3774      * the buffer to a smaller size in the destination, it does so, sets
3775      * the \c compression_failed return to 0 and returns 0.  If compression
3776      * does not produce a smaller result, the callback sets the
3777      * \c compression_failed return to 1 and returns 0. If another
3778      * error occurs, it returns an errno or WiredTiger error code.
3779      *
3780      * On entry, \c src will point to memory, with the length of the memory
3781      * in \c src_len.  After successful completion, the callback should
3782      * return \c 0 and set \c result_lenp to the number of bytes required
3783      * for the compressed representation.
3784      *
3785      * On entry, \c dst points to the destination buffer with a length
3786      * of \c dst_len.  If the WT_COMPRESSOR::pre_size method is specified,
3787      * the destination buffer will be at least the size returned by that
3788      * method; otherwise, the destination buffer will be at least as large
3789      * as the length of the data to compress.
3790      *
3791      * If compression would not shrink the data or the \c dst buffer is not
3792      * large enough to hold the compressed data, the callback should set
3793      * \c compression_failed to a non-zero value and return 0.
3794      *
3795      * @param[in] src the data to compress
3796      * @param[in] src_len the length of the data to compress
3797      * @param[in] dst the destination buffer
3798      * @param[in] dst_len the length of the destination buffer
3799      * @param[out] result_lenp the length of the compressed data
3800      * @param[out] compression_failed non-zero if compression did not
3801      * decrease the length of the data (compression may not have completed)
3802      * @returns zero for success, non-zero to indicate an error.
3803      *
3804      * @snippet nop_compress.c WT_COMPRESSOR compress
3805      */
3806     int (*compress)(WT_COMPRESSOR *compressor, WT_SESSION *session,
3807         uint8_t *src, size_t src_len,
3808         uint8_t *dst, size_t dst_len,
3809         size_t *result_lenp, int *compression_failed);
3810 
3811     /*!
3812      * Callback to decompress a chunk of data.
3813      *
3814      * WT_COMPRESSOR::decompress takes a source buffer and a destination
3815      * buffer.  The contents are switched from \c compress: the
3816      * source buffer is the compressed value, and the destination buffer is
3817      * sized to be the original size.  If the callback successfully
3818      * decompresses the source buffer to the destination buffer, it returns
3819      * 0.  If an error occurs, it returns an errno or WiredTiger error code.
3820      * The source buffer that WT_COMPRESSOR::decompress takes may have a
3821      * size that is rounded up from the size originally produced by
3822      * WT_COMPRESSOR::compress, with the remainder of the buffer set to
3823      * zeroes. Most compressors do not care about this difference if the
3824      * size to be decompressed can be implicitly discovered from the
3825      * compressed data.  If your compressor cares, you may need to allocate
3826      * space for, and store, the actual size in the compressed buffer.  See
3827      * the source code for the included snappy compressor for an example.
3828      *
3829      * On entry, \c src will point to memory, with the length of the memory
3830      * in \c src_len.  After successful completion, the callback should
3831      * return \c 0 and set \c result_lenp to the number of bytes required
3832      * for the decompressed representation.
3833      *
3834      * If the \c dst buffer is not big enough to hold the decompressed
3835      * data, the callback should return an error.
3836      *
3837      * @param[in] src the data to decompress
3838      * @param[in] src_len the length of the data to decompress
3839      * @param[in] dst the destination buffer
3840      * @param[in] dst_len the length of the destination buffer
3841      * @param[out] result_lenp the length of the decompressed data
3842      * @returns zero for success, non-zero to indicate an error.
3843      *
3844      * @snippet nop_compress.c WT_COMPRESSOR decompress
3845      */
3846     int (*decompress)(WT_COMPRESSOR *compressor, WT_SESSION *session,
3847         uint8_t *src, size_t src_len,
3848         uint8_t *dst, size_t dst_len,
3849         size_t *result_lenp);
3850 
3851     /*!
3852      * Callback to size a destination buffer for compression
3853      *
3854      * WT_COMPRESSOR::pre_size is an optional callback that, given the
3855      * source buffer and size, produces the size of the destination buffer
3856      * to be given to WT_COMPRESSOR::compress.  This is useful for
3857      * compressors that assume that the output buffer is sized for the
3858      * worst case and thus no overrun checks are made.  If your compressor
3859      * works like this, WT_COMPRESSOR::pre_size will need to be defined.
3860      * See the source code for the snappy compressor for an example.
3861      * However, if your compressor detects and avoids overruns against its
3862      * target buffer, you will not need to define WT_COMPRESSOR::pre_size.
3863      * When WT_COMPRESSOR::pre_size is set to NULL, the destination buffer
3864      * is sized the same as the source buffer.  This is always sufficient,
3865      * since a compression result that is larger than the source buffer is
3866      * discarded by WiredTiger.
3867      *
3868      * If not NULL, this callback is called before each call to
3869      * WT_COMPRESSOR::compress to determine the size of the destination
3870      * buffer to provide.  If the callback is NULL, the destination
3871      * buffer will be the same size as the source buffer.
3872      *
3873      * The callback should set \c result_lenp to a suitable buffer size
3874      * for compression, typically the maximum length required by
3875      * WT_COMPRESSOR::compress.
3876      *
3877      * This callback function is for compressors that require an output
3878      * buffer larger than the source buffer (for example, that do not
3879      * check for buffer overflow during compression).
3880      *
3881      * @param[in] src the data to compress
3882      * @param[in] src_len the length of the data to compress
3883      * @param[out] result_lenp the required destination buffer size
3884      * @returns zero for success, non-zero to indicate an error.
3885      *
3886      * @snippet nop_compress.c WT_COMPRESSOR presize
3887      */
3888     int (*pre_size)(WT_COMPRESSOR *compressor, WT_SESSION *session,
3889         uint8_t *src, size_t src_len, size_t *result_lenp);
3890 
3891     /*!
3892      * If non-NULL, a callback performed when the database is closed.
3893      *
3894      * The WT_COMPRESSOR::terminate callback is intended to allow cleanup,
3895      * the handle will not be subsequently accessed by WiredTiger.
3896      *
3897      * @snippet nop_compress.c WT_COMPRESSOR terminate
3898      */
3899     int (*terminate)(WT_COMPRESSOR *compressor, WT_SESSION *session);
3900 };
3901 
3902 /*!
3903  * Applications can extend WiredTiger by providing new implementations of the
3904  * WT_DATA_SOURCE class.  Each data source supports a different URI scheme for
3905  * data sources to WT_SESSION::create, WT_SESSION::open_cursor and related
3906  * methods.  See @ref custom_data_sources for more information.
3907  *
3908  * <b>Thread safety:</b> WiredTiger may invoke methods on the WT_DATA_SOURCE
3909  * interface from multiple threads concurrently.  It is the responsibility of
3910  * the implementation to protect any shared data.
3911  *
3912  * Applications register their implementation with WiredTiger by calling
3913  * WT_CONNECTION::add_data_source.
3914  *
3915  * @snippet ex_data_source.c WT_DATA_SOURCE register
3916  */
3917 struct __wt_data_source {
3918     /*!
3919      * Callback to alter an object.
3920      *
3921      * @snippet ex_data_source.c WT_DATA_SOURCE alter
3922      */
3923     int (*alter)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3924         const char *uri, WT_CONFIG_ARG *config);
3925 
3926     /*!
3927      * Callback to create a new object.
3928      *
3929      * @snippet ex_data_source.c WT_DATA_SOURCE create
3930      */
3931     int (*create)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3932         const char *uri, WT_CONFIG_ARG *config);
3933 
3934     /*!
3935      * Callback to compact an object.
3936      *
3937      * @snippet ex_data_source.c WT_DATA_SOURCE compact
3938      */
3939     int (*compact)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3940         const char *uri, WT_CONFIG_ARG *config);
3941 
3942     /*!
3943      * Callback to drop an object.
3944      *
3945      * @snippet ex_data_source.c WT_DATA_SOURCE drop
3946      */
3947     int (*drop)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3948         const char *uri, WT_CONFIG_ARG *config);
3949 
3950     /*!
3951      * Callback to initialize a cursor.
3952      *
3953      * @snippet ex_data_source.c WT_DATA_SOURCE open_cursor
3954      */
3955     int (*open_cursor)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3956         const char *uri, WT_CONFIG_ARG *config, WT_CURSOR **new_cursor);
3957 
3958     /*!
3959      * Callback to rename an object.
3960      *
3961      * @snippet ex_data_source.c WT_DATA_SOURCE rename
3962      */
3963     int (*rename)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3964         const char *uri, const char *newuri, WT_CONFIG_ARG *config);
3965 
3966     /*!
3967      * Callback to salvage an object.
3968      *
3969      * @snippet ex_data_source.c WT_DATA_SOURCE salvage
3970      */
3971     int (*salvage)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3972         const char *uri, WT_CONFIG_ARG *config);
3973 
3974     /*!
3975      * Callback to get the size of an object.
3976      *
3977      * @snippet ex_data_source.c WT_DATA_SOURCE size
3978      */
3979     int (*size)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3980         const char *uri, wt_off_t *size);
3981 
3982     /*!
3983      * Callback to truncate an object.
3984      *
3985      * @snippet ex_data_source.c WT_DATA_SOURCE truncate
3986      */
3987     int (*truncate)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3988         const char *uri, WT_CONFIG_ARG *config);
3989 
3990     /*!
3991      * Callback to truncate a range of an object.
3992      *
3993      * @snippet ex_data_source.c WT_DATA_SOURCE range truncate
3994      */
3995     int (*range_truncate)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
3996         WT_CURSOR *start, WT_CURSOR *stop);
3997 
3998     /*!
3999      * Callback to verify an object.
4000      *
4001      * @snippet ex_data_source.c WT_DATA_SOURCE verify
4002      */
4003     int (*verify)(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
4004         const char *uri, WT_CONFIG_ARG *config);
4005 
4006     /*!
4007      * Callback to checkpoint the database.
4008      *
4009      * @snippet ex_data_source.c WT_DATA_SOURCE checkpoint
4010      */
4011     int (*checkpoint)(
4012         WT_DATA_SOURCE *dsrc, WT_SESSION *session, WT_CONFIG_ARG *config);
4013 
4014     /*!
4015      * If non-NULL, a callback performed when the database is closed.
4016      *
4017      * The WT_DATA_SOURCE::terminate callback is intended to allow cleanup,
4018      * the handle will not be subsequently accessed by WiredTiger.
4019      *
4020      * @snippet ex_data_source.c WT_DATA_SOURCE terminate
4021      */
4022     int (*terminate)(WT_DATA_SOURCE *dsrc, WT_SESSION *session);
4023 
4024     /*!
4025      * If non-NULL, a callback performed before an LSM merge.
4026      *
4027      * @param[in] source a cursor configured with the data being merged
4028      * @param[in] dest a cursor on the new object being filled by the merge
4029      *
4030      * @snippet ex_data_source.c WT_DATA_SOURCE lsm_pre_merge
4031      */
4032     int (*lsm_pre_merge)(
4033         WT_DATA_SOURCE *dsrc, WT_CURSOR *source, WT_CURSOR *dest);
4034 };
4035 
4036 /*!
4037  * The interface implemented by applications to provide custom encryption.
4038  *
4039  * Encryptors must implement the WT_ENCRYPTOR interface: the
4040  * WT_ENCRYPTOR::encrypt, WT_ENCRYPTOR::decrypt and WT_ENCRYPTOR::sizing
4041  * callbacks must be specified, WT_ENCRYPTOR::customize and
4042  * WT_ENCRYPTOR::terminate are optional.  To build your own encryptor, use
4043  * one of the encryptors in \c ext/encryptors as a template:
4044  * \c ext/encryptors/nop_encrypt is a simple encryptor that passes through
4045  * data unchanged, and is a reasonable starting point;
4046  * \c ext/encryptors/rotn_encrypt is an encryptor implementing
4047  * a simple rotation cipher, it shows the use of \c keyid, \c secretkey,
4048  * and implements the WT_ENCRYPTOR::customize and
4049  * WT_ENCRYPTOR::terminate callbacks.
4050  *
4051  * Applications register their implementation with WiredTiger by calling
4052  * WT_CONNECTION::add_encryptor.
4053  *
4054  * @snippet nop_encrypt.c WT_ENCRYPTOR initialization structure
4055  * @snippet nop_encrypt.c WT_ENCRYPTOR initialization function
4056  */
4057 struct __wt_encryptor {
4058     /*!
4059      * Callback to encrypt a chunk of data.
4060      *
4061      * WT_ENCRYPTOR::encrypt takes a source buffer and a destination
4062      * buffer.  The callback encrypts the source buffer (plain text)
4063      * into the destination buffer.
4064      *
4065      * On entry, \c src will point to memory, with the length of the memory
4066      * in \c src_len.  After successful completion, the callback should
4067      * return \c 0 and set \c result_lenp to the number of bytes required
4068      * for the encrypted representation.
4069      *
4070      * On entry, \c dst points to the destination buffer with a length
4071      * of \c dst_len.  The destination buffer will be at least src_len
4072      * plus the size returned by that WT_ENCRYPT::sizing.
4073      *
4074      * This callback cannot be NULL.
4075      *
4076      * @param[in] src the data to encrypt
4077      * @param[in] src_len the length of the data to encrypt
4078      * @param[in] dst the destination buffer
4079      * @param[in] dst_len the length of the destination buffer
4080      * @param[out] result_lenp the length of the encrypted data
4081      * @returns zero for success, non-zero to indicate an error.
4082      *
4083      * @snippet nop_encrypt.c WT_ENCRYPTOR encrypt
4084      */
4085     int (*encrypt)(WT_ENCRYPTOR *encryptor, WT_SESSION *session,
4086         uint8_t *src, size_t src_len,
4087         uint8_t *dst, size_t dst_len,
4088         size_t *result_lenp);
4089 
4090     /*!
4091      * Callback to decrypt a chunk of data.
4092      *
4093      * WT_ENCRYPTOR::decrypt takes a source buffer and a destination
4094      * buffer.  The contents are switched from \c encrypt: the
4095      * source buffer is the encrypted value, and the destination buffer is
4096      * sized to be the original size.  If the callback successfully
4097      * decrypts the source buffer to the destination buffer, it returns
4098      * 0.  If an error occurs, it returns an errno or WiredTiger error code.
4099      *
4100      * On entry, \c src will point to memory, with the length of the memory
4101      * in \c src_len.  After successful completion, the callback should
4102      * return \c 0 and set \c result_lenp to the number of bytes required
4103      * for the decrypted representation.
4104      *
4105      * If the \c dst buffer is not big enough to hold the decrypted
4106      * data, the callback should return an error.
4107      *
4108      * This callback cannot be NULL.
4109      *
4110      * @param[in] src the data to decrypt
4111      * @param[in] src_len the length of the data to decrypt
4112      * @param[in] dst the destination buffer
4113      * @param[in] dst_len the length of the destination buffer
4114      * @param[out] result_lenp the length of the decrypted data
4115      * @returns zero for success, non-zero to indicate an error.
4116      *
4117      * @snippet nop_encrypt.c WT_ENCRYPTOR decrypt
4118      */
4119     int (*decrypt)(WT_ENCRYPTOR *encryptor, WT_SESSION *session,
4120         uint8_t *src, size_t src_len,
4121         uint8_t *dst, size_t dst_len,
4122         size_t *result_lenp);
4123 
4124     /*!
4125      * Callback to size a destination buffer for encryption.
4126      *
4127      * WT_ENCRYPTOR::sizing is an callback that returns the number
4128      * of additional bytes that is needed when encrypting a
4129      * text buffer.  This is always necessary, since encryptors
4130      * typically generate encrypted text that is larger than the
4131      * plain text input. Without such a call, WiredTiger would
4132      * have no way to know the worst case for the encrypted buffer size.
4133      * The WiredTiger encryption infrastructure assumes that
4134      * buffer sizing is not dependent on the number of bytes
4135      * of input, that there is a one to one relationship in number
4136      * of bytes needed between input and output.
4137      *
4138      * This callback cannot be NULL.
4139      *
4140      * The callback should set \c expansion_constantp to the additional
4141      * number of bytes needed.
4142      *
4143      * @param[out] expansion_constantp the additional number of bytes needed
4144      *    when encrypting.
4145      * @returns zero for success, non-zero to indicate an error.
4146      *
4147      * @snippet nop_encrypt.c WT_ENCRYPTOR sizing
4148      */
4149     int (*sizing)(WT_ENCRYPTOR *encryptor, WT_SESSION *session,
4150         size_t *expansion_constantp);
4151 
4152     /*!
4153      * If non-NULL, this callback is called to customize the encryptor.
4154      * The customize function is called whenever a keyid is used for the
4155      * first time with this encryptor, whether it be in
4156      * the ::wiredtiger_open call or the WT_SESSION::create
4157      * call. This gives the algorithm an
4158      * opportunity to retrieve and save keys in a customized encryptor.
4159      * If the callback returns a non-NULL encryptor, that instance
4160      * is used instead of this one for any callbacks.
4161      *
4162      * @param[in] encrypt_config the "encryption" portion of the
4163      *    configuration from the wiredtiger_open or WT_SESSION::create call
4164      * @param[out] customp the new modified encryptor, or NULL.
4165      * @returns zero for success, non-zero to indicate an error.
4166      */
4167     int (*customize)(WT_ENCRYPTOR *encryptor, WT_SESSION *session,
4168         WT_CONFIG_ARG *encrypt_config, WT_ENCRYPTOR **customp);
4169 
4170     /*!
4171      * If non-NULL, a callback performed when the database is closed.
4172      * It is called for each encryptor that was added using
4173      * WT_CONNECTION::add_encryptor or returned by the
4174      * WT_ENCRYPTOR::customize callback.
4175      *
4176      * The WT_ENCRYPTOR::terminate callback is intended to allow cleanup,
4177      * the handle will not be subsequently accessed by WiredTiger.
4178      *
4179      * @snippet nop_encrypt.c WT_ENCRYPTOR terminate
4180      */
4181     int (*terminate)(WT_ENCRYPTOR *encryptor, WT_SESSION *session);
4182 };
4183 
4184 /*!
4185  * The interface implemented by applications to provide custom extraction of
4186  * index keys or column group values.
4187  *
4188  * Applications register implementations with WiredTiger by calling
4189  * WT_CONNECTION::add_extractor.  See @ref custom_extractors for more
4190  * information.
4191  *
4192  * @snippet ex_all.c WT_EXTRACTOR register
4193  */
4194 struct __wt_extractor {
4195     /*!
4196      * Callback to extract a value for an index or column group.
4197      *
4198      * @errors
4199      *
4200      * @snippet ex_all.c WT_EXTRACTOR
4201      *
4202      * @param extractor the WT_EXTRACTOR implementation
4203      * @param session the current WiredTiger session
4204      * @param key the table key in raw format, see @ref cursor_raw for
4205      *  details
4206      * @param value the table value in raw format, see @ref cursor_raw for
4207      *  details
4208      * @param[out] result_cursor the method should call WT_CURSOR::set_key
4209      *  and WT_CURSOR::insert on this cursor to return a key.  The \c
4210      *  key_format of the cursor will match that passed to
4211      *  WT_SESSION::create for the index.  Multiple index keys can be
4212      *  created for each record by calling WT_CURSOR::insert multiple
4213      *  times.
4214      */
4215     int (*extract)(WT_EXTRACTOR *extractor, WT_SESSION *session,
4216         const WT_ITEM *key, const WT_ITEM *value,
4217         WT_CURSOR *result_cursor);
4218 
4219     /*!
4220      * If non-NULL, this callback is called to customize the extractor for
4221      * each index.  If the callback returns a non-NULL extractor, that
4222      * instance is used instead of this one for all comparisons.
4223      */
4224     int (*customize)(WT_EXTRACTOR *extractor, WT_SESSION *session,
4225         const char *uri, WT_CONFIG_ITEM *appcfg, WT_EXTRACTOR **customp);
4226 
4227     /*!
4228      * If non-NULL a callback performed when the index or column group
4229      * is closed for customized extractors otherwise when the database
4230      * is closed.
4231      *
4232      * The WT_EXTRACTOR::terminate callback is intended to allow cleanup,
4233      * the handle will not be subsequently accessed by WiredTiger.
4234      */
4235     int (*terminate)(WT_EXTRACTOR *extractor, WT_SESSION *session);
4236 };
4237 
4238 /*! WT_FILE_SYSTEM::open_file file types */
4239 typedef enum {
4240     WT_FS_OPEN_FILE_TYPE_CHECKPOINT,/*!< open a data file checkpoint */
4241     WT_FS_OPEN_FILE_TYPE_DATA,  /*!< open a data file */
4242     WT_FS_OPEN_FILE_TYPE_DIRECTORY, /*!< open a directory */
4243     WT_FS_OPEN_FILE_TYPE_LOG,   /*!< open a log file */
4244     WT_FS_OPEN_FILE_TYPE_REGULAR    /*!< open a regular file */
4245 } WT_FS_OPEN_FILE_TYPE;
4246 
4247 #ifdef DOXYGEN
4248 /*! WT_FILE_SYSTEM::open_file flags: random access pattern */
4249 #define WT_FS_OPEN_ACCESS_RAND  0x0
4250 /*! WT_FILE_SYSTEM::open_file flags: sequential access pattern */
4251 #define WT_FS_OPEN_ACCESS_SEQ   0x0
4252 /*! WT_FILE_SYSTEM::open_file flags: create if does not exist */
4253 #define WT_FS_OPEN_CREATE   0x0
4254 /*! WT_FILE_SYSTEM::open_file flags: direct I/O requested */
4255 #define WT_FS_OPEN_DIRECTIO 0x0
4256 /*! WT_FILE_SYSTEM::open_file flags: file creation must be durable */
4257 #define WT_FS_OPEN_DURABLE  0x0
4258 /*!
4259  * WT_FILE_SYSTEM::open_file flags: return EBUSY if exclusive use not available
4260  */
4261 #define WT_FS_OPEN_EXCLUSIVE    0x0
4262 /*! WT_FILE_SYSTEM::open_file flags: open is read-only */
4263 #define WT_FS_OPEN_READONLY 0x0
4264 
4265 /*!
4266  * WT_FILE_SYSTEM::remove or WT_FILE_SYSTEM::rename flags: the remove or rename
4267  * operation must be durable
4268  */
4269 #define WT_FS_DURABLE       0x0
4270 #else
4271 /* AUTOMATIC FLAG VALUE GENERATION START */
4272 #define WT_FS_OPEN_ACCESS_RAND  0x01u
4273 #define WT_FS_OPEN_ACCESS_SEQ   0x02u
4274 #define WT_FS_OPEN_CREATE   0x04u
4275 #define WT_FS_OPEN_DIRECTIO 0x08u
4276 #define WT_FS_OPEN_DURABLE  0x10u
4277 #define WT_FS_OPEN_EXCLUSIVE    0x20u
4278 #define WT_FS_OPEN_FIXED    0x40u   /* Path not home relative (internal) */
4279 #define WT_FS_OPEN_READONLY 0x80u
4280 /* AUTOMATIC FLAG VALUE GENERATION STOP */
4281 
4282 /* AUTOMATIC FLAG VALUE GENERATION START */
4283 #define WT_FS_DURABLE       0x1u
4284 /* AUTOMATIC FLAG VALUE GENERATION STOP */
4285 #endif
4286 
4287 /*!
4288  * The interface implemented by applications to provide a custom file system
4289  * implementation.
4290  *
4291  * <b>Thread safety:</b> WiredTiger may invoke methods on the WT_FILE_SYSTEM
4292  * interface from multiple threads concurrently. It is the responsibility of
4293  * the implementation to protect any shared data.
4294  *
4295  * Applications register implementations with WiredTiger by calling
4296  * WT_CONNECTION::set_file_system.  See @ref custom_file_systems for more
4297  * information.
4298  *
4299  * @snippet ex_file_system.c WT_FILE_SYSTEM register
4300  */
4301 struct __wt_file_system {
4302     /*!
4303      * Return a list of file names for the named directory.
4304      *
4305      * @errors
4306      *
4307      * @param file_system the WT_FILE_SYSTEM
4308      * @param session the current WiredTiger session
4309      * @param directory the name of the directory
4310      * @param prefix if not NULL, only files with names matching the prefix
4311      *    are returned
4312      * @param[out] dirlist the method returns an allocated array of
4313      *    individually allocated strings, one for each entry in the
4314      *    directory.
4315      * @param[out] countp the number of entries returned
4316      */
4317     int (*fs_directory_list)(WT_FILE_SYSTEM *file_system,
4318         WT_SESSION *session, const char *directory, const char *prefix,
4319         char ***dirlist, uint32_t *countp);
4320 
4321 #if !defined(DOXYGEN)
4322     /*
4323      * Return a single file name for the named directory.
4324      */
4325     int (*fs_directory_list_single)(WT_FILE_SYSTEM *file_system,
4326         WT_SESSION *session, const char *directory, const char *prefix,
4327         char ***dirlist, uint32_t *countp);
4328 #endif
4329 
4330     /*!
4331      * Free memory allocated by WT_FILE_SYSTEM::directory_list.
4332      *
4333      * @errors
4334      *
4335      * @param file_system the WT_FILE_SYSTEM
4336      * @param session the current WiredTiger session
4337      * @param dirlist array returned by WT_FILE_SYSTEM::directory_list
4338      * @param count count returned by WT_FILE_SYSTEM::directory_list
4339      */
4340     int (*fs_directory_list_free)(WT_FILE_SYSTEM *file_system,
4341         WT_SESSION *session, char **dirlist, uint32_t count);
4342 
4343     /*!
4344      * Return if the named file system object exists.
4345      *
4346      * @errors
4347      *
4348      * @param file_system the WT_FILE_SYSTEM
4349      * @param session the current WiredTiger session
4350      * @param name the name of the file
4351      * @param[out] existp If the named file system object exists
4352      */
4353     int (*fs_exist)(WT_FILE_SYSTEM *file_system,
4354         WT_SESSION *session, const char *name, bool *existp);
4355 
4356     /*!
4357      * Open a handle for a named file system object
4358      *
4359      * The method should return ENOENT if the file is not being created and
4360      * does not exist.
4361      *
4362      * The method should return EACCES if the file cannot be opened in the
4363      * requested mode (for example, a file opened for writing in a readonly
4364      * file system).
4365      *
4366      * The method should return EBUSY if ::WT_FS_OPEN_EXCLUSIVE is set and
4367      * the file is in use.
4368      *
4369      * @errors
4370      *
4371      * @param file_system the WT_FILE_SYSTEM
4372      * @param session the current WiredTiger session
4373      * @param name the name of the file system object
4374      * @param file_type the type of the file
4375      *    The file type is provided to allow optimization for different file
4376      *    access patterns.
4377      * @param flags flags indicating how to open the file, one or more of
4378      *    ::WT_FS_OPEN_CREATE, ::WT_FS_OPEN_DIRECTIO, ::WT_FS_OPEN_DURABLE,
4379      *    ::WT_FS_OPEN_EXCLUSIVE or ::WT_FS_OPEN_READONLY.
4380      * @param[out] file_handlep the handle to the newly opened file. File
4381      *    system implementations must allocate memory for the handle and
4382      *    the WT_FILE_HANDLE::name field, and fill in the WT_FILE_HANDLE::
4383      *    fields. Applications wanting to associate private information
4384      *    with the WT_FILE_HANDLE:: structure should declare and allocate
4385      *    their own structure as a superset of a WT_FILE_HANDLE:: structure.
4386      */
4387     int (*fs_open_file)(WT_FILE_SYSTEM *file_system, WT_SESSION *session,
4388         const char *name, WT_FS_OPEN_FILE_TYPE file_type, uint32_t flags,
4389         WT_FILE_HANDLE **file_handlep);
4390 
4391     /*!
4392      * Remove a named file system object
4393      *
4394      * This method is not required for readonly file systems and should be
4395      * set to NULL when not required by the file system.
4396      *
4397      * @errors
4398      *
4399      * @param file_system the WT_FILE_SYSTEM
4400      * @param session the current WiredTiger session
4401      * @param name the name of the file system object
4402      * @param flags 0 or ::WT_FS_DURABLE
4403      */
4404     int (*fs_remove)(WT_FILE_SYSTEM *file_system,
4405         WT_SESSION *session, const char *name, uint32_t flags);
4406 
4407     /*!
4408      * Rename a named file system object
4409      *
4410      * This method is not required for readonly file systems and should be
4411      * set to NULL when not required by the file system.
4412      *
4413      * @errors
4414      *
4415      * @param file_system the WT_FILE_SYSTEM
4416      * @param session the current WiredTiger session
4417      * @param from the original name of the object
4418      * @param to the new name for the object
4419      * @param flags 0 or ::WT_FS_DURABLE
4420      */
4421     int (*fs_rename)(WT_FILE_SYSTEM *file_system, WT_SESSION *session,
4422         const char *from, const char *to, uint32_t flags);
4423 
4424     /*!
4425      * Return the size of a named file system object
4426      *
4427      * @errors
4428      *
4429      * @param file_system the WT_FILE_SYSTEM
4430      * @param session the current WiredTiger session
4431      * @param name the name of the file system object
4432      * @param[out] sizep the size of the file system entry
4433      */
4434     int (*fs_size)(WT_FILE_SYSTEM *file_system,
4435         WT_SESSION *session, const char *name, wt_off_t *sizep);
4436 
4437     /*!
4438      * A callback performed when the file system is closed and will no
4439      * longer be accessed by the WiredTiger database.
4440      *
4441      * This method is not required and should be set to NULL when not
4442      * required by the file system.
4443      *
4444      * The WT_FILE_SYSTEM::terminate callback is intended to allow cleanup,
4445      * the handle will not be subsequently accessed by WiredTiger.
4446      */
4447     int (*terminate)(WT_FILE_SYSTEM *file_system, WT_SESSION *session);
4448 };
4449 
4450 /*! WT_FILE_HANDLE::fadvise flags: no longer need */
4451 #define WT_FILE_HANDLE_DONTNEED 1
4452 /*! WT_FILE_HANDLE::fadvise flags: will need */
4453 #define WT_FILE_HANDLE_WILLNEED 2
4454 
4455 /*!
4456  * A file handle implementation returned by WT_FILE_SYSTEM::open_file.
4457  *
4458  * <b>Thread safety:</b> Unless explicitly stated otherwise, WiredTiger may
4459  * invoke methods on the WT_FILE_HANDLE interface from multiple threads
4460  * concurrently. It is the responsibility of the implementation to protect
4461  * any shared data.
4462  *
4463  * See @ref custom_file_systems for more information.
4464  */
4465 struct __wt_file_handle {
4466     /*!
4467      * The enclosing file system, set by WT_FILE_SYSTEM::open_file.
4468      */
4469     WT_FILE_SYSTEM *file_system;
4470 
4471     /*!
4472      * The name of the file, set by WT_FILE_SYSTEM::open_file.
4473      */
4474     char *name;
4475 
4476     /*!
4477      * Close a file handle, the handle will not be further accessed by
4478      * WiredTiger.
4479      *
4480      * @errors
4481      *
4482      * @param file_handle the WT_FILE_HANDLE
4483      * @param session the current WiredTiger session
4484      */
4485     int (*close)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
4486 
4487     /*!
4488      * Indicate expected future use of file ranges, based on the POSIX
4489      * 1003.1 standard fadvise.
4490      *
4491      * This method is not required, and should be set to NULL when not
4492      * supported by the file.
4493      *
4494      * @errors
4495      *
4496      * @param file_handle the WT_FILE_HANDLE
4497      * @param session the current WiredTiger session
4498      * @param offset the file offset
4499      * @param len the size of the advisory
4500      * @param advice one of ::WT_FILE_HANDLE_WILLNEED or
4501      *    ::WT_FILE_HANDLE_DONTNEED.
4502      */
4503     int (*fh_advise)(WT_FILE_HANDLE *file_handle,
4504         WT_SESSION *session, wt_off_t offset, wt_off_t len, int advice);
4505 
4506     /*!
4507      * Extend the file.
4508      *
4509      * This method is not required, and should be set to NULL when not
4510      * supported by the file.
4511      *
4512      * Any allocated disk space must read as 0 bytes, and no existing file
4513      * data may change. Allocating all necessary underlying storage (not
4514      * changing just the file's metadata), is likely to result in increased
4515      * performance.
4516      *
4517      * This method is not called by multiple threads concurrently (on the
4518      * same file handle). If the file handle's extension method supports
4519      * concurrent calls, set the WT_FILE_HANDLE::fh_extend_nolock method
4520      * instead. See @ref custom_file_systems for more information.
4521      *
4522      * @errors
4523      *
4524      * @param file_handle the WT_FILE_HANDLE
4525      * @param session the current WiredTiger session
4526      * @param offset desired file size after extension
4527      */
4528     int (*fh_extend)(
4529         WT_FILE_HANDLE *file_handle, WT_SESSION *session, wt_off_t offset);
4530 
4531     /*!
4532      * Extend the file.
4533      *
4534      * This method is not required, and should be set to NULL when not
4535      * supported by the file.
4536      *
4537      * Any allocated disk space must read as 0 bytes, and no existing file
4538      * data may change. Allocating all necessary underlying storage (not
4539      * only changing the file's metadata), is likely to result in increased
4540      * performance.
4541      *
4542      * This method may be called by multiple threads concurrently (on the
4543      * same file handle). If the file handle's extension method does not
4544      * support concurrent calls, set the WT_FILE_HANDLE::fh_extend method
4545      * instead. See @ref custom_file_systems for more information.
4546      *
4547      * @errors
4548      *
4549      * @param file_handle the WT_FILE_HANDLE
4550      * @param session the current WiredTiger session
4551      * @param offset desired file size after extension
4552      */
4553     int (*fh_extend_nolock)(
4554         WT_FILE_HANDLE *file_handle, WT_SESSION *session, wt_off_t offset);
4555 
4556     /*!
4557      * Lock/unlock a file from the perspective of other processes running
4558      * in the system, where necessary.
4559      *
4560      * @errors
4561      *
4562      * @param file_handle the WT_FILE_HANDLE
4563      * @param session the current WiredTiger session
4564      * @param lock whether to lock or unlock
4565      */
4566     int (*fh_lock)(
4567         WT_FILE_HANDLE *file_handle, WT_SESSION *session, bool lock);
4568 
4569     /*!
4570      * Map a file into memory, based on the POSIX 1003.1 standard mmap.
4571      *
4572      * This method is not required, and should be set to NULL when not
4573      * supported by the file.
4574      *
4575      * @errors
4576      *
4577      * @param file_handle the WT_FILE_HANDLE
4578      * @param session the current WiredTiger session
4579      * @param[out] mapped_regionp a reference to a memory location into
4580      *    which should be stored a pointer to the start of the mapped region
4581      * @param[out] lengthp a reference to a memory location into which
4582      *    should be stored the length of the region
4583      * @param[out] mapped_cookiep a reference to a memory location into
4584      *    which can be optionally stored a pointer to an opaque cookie
4585      *    which is subsequently passed to WT_FILE_HANDLE::unmap.
4586      */
4587     int (*fh_map)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
4588         void *mapped_regionp, size_t *lengthp, void *mapped_cookiep);
4589 
4590     /*!
4591      * Unmap part of a memory mapped file, based on the POSIX 1003.1
4592      * standard madvise.
4593      *
4594      * This method is not required, and should be set to NULL when not
4595      * supported by the file.
4596      *
4597      * @errors
4598      *
4599      * @param file_handle the WT_FILE_HANDLE
4600      * @param session the current WiredTiger session
4601      * @param map a location in the mapped region unlikely to be used in the
4602      *    near future
4603      * @param length the length of the mapped region to discard
4604      * @param mapped_cookie any cookie set by the WT_FILE_HANDLE::map method
4605      */
4606     int (*fh_map_discard)(WT_FILE_HANDLE *file_handle,
4607         WT_SESSION *session, void *map, size_t length, void *mapped_cookie);
4608 
4609     /*!
4610      * Preload part of a memory mapped file, based on the POSIX 1003.1
4611      * standard madvise.
4612      *
4613      * This method is not required, and should be set to NULL when not
4614      * supported by the file.
4615      *
4616      * @errors
4617      *
4618      * @param file_handle the WT_FILE_HANDLE
4619      * @param session the current WiredTiger session
4620      * @param map a location in the mapped region likely to be used in the
4621      *    near future
4622      * @param length the size of the mapped region to preload
4623      * @param mapped_cookie any cookie set by the WT_FILE_HANDLE::map method
4624      */
4625     int (*fh_map_preload)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
4626         const void *map, size_t length, void *mapped_cookie);
4627 
4628     /*!
4629      * Unmap a memory mapped file, based on the POSIX 1003.1 standard
4630      * munmap.
4631      *
4632      * This method is only required if a valid implementation of map is
4633      * provided by the file, and should be set to NULL otherwise.
4634      *
4635      * @errors
4636      *
4637      * @param file_handle the WT_FILE_HANDLE
4638      * @param session the current WiredTiger session
4639      * @param mapped_region a pointer to the start of the mapped region
4640      * @param length the length of the mapped region
4641      * @param mapped_cookie any cookie set by the WT_FILE_HANDLE::map method
4642      */
4643     int (*fh_unmap)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
4644         void *mapped_region, size_t length, void *mapped_cookie);
4645 
4646     /*!
4647      * Read from a file, based on the POSIX 1003.1 standard pread.
4648      *
4649      * @errors
4650      *
4651      * @param file_handle the WT_FILE_HANDLE
4652      * @param session the current WiredTiger session
4653      * @param offset the offset in the file to start reading from
4654      * @param len the amount to read
4655      * @param[out] buf buffer to hold the content read from file
4656      */
4657     int (*fh_read)(WT_FILE_HANDLE *file_handle,
4658         WT_SESSION *session, wt_off_t offset, size_t len, void *buf);
4659 
4660     /*!
4661      * Return the size of a file.
4662      *
4663      * @errors
4664      *
4665      * @param file_handle the WT_FILE_HANDLE
4666      * @param session the current WiredTiger session
4667      * @param sizep the size of the file
4668      */
4669     int (*fh_size)(
4670         WT_FILE_HANDLE *file_handle, WT_SESSION *session, wt_off_t *sizep);
4671 
4672     /*!
4673      * Make outstanding file writes durable and do not return until writes
4674      * are complete.
4675      *
4676      * This method is not required for read-only files, and should be set
4677      * to NULL when not supported by the file.
4678      *
4679      * @errors
4680      *
4681      * @param file_handle the WT_FILE_HANDLE
4682      * @param session the current WiredTiger session
4683      */
4684     int (*fh_sync)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
4685 
4686     /*!
4687      * Schedule the outstanding file writes required for durability and
4688      * return immediately.
4689      *
4690      * This method is not required, and should be set to NULL when not
4691      * supported by the file.
4692      *
4693      * @errors
4694      *
4695      * @param file_handle the WT_FILE_HANDLE
4696      * @param session the current WiredTiger session
4697      */
4698     int (*fh_sync_nowait)(WT_FILE_HANDLE *file_handle, WT_SESSION *session);
4699 
4700     /*!
4701      * Truncate the file.
4702      *
4703      * This method is not required, and should be set to NULL when not
4704      * supported by the file.
4705      *
4706      * This method is not called by multiple threads concurrently (on the
4707      * same file handle).
4708      *
4709      * @errors
4710      *
4711      * @param file_handle the WT_FILE_HANDLE
4712      * @param session the current WiredTiger session
4713      * @param offset desired file size after truncate
4714      */
4715     int (*fh_truncate)(
4716         WT_FILE_HANDLE *file_handle, WT_SESSION *session, wt_off_t offset);
4717 
4718     /*!
4719      * Write to a file, based on the POSIX 1003.1 standard pwrite.
4720      *
4721      * This method is not required for read-only files, and should be set
4722      * to NULL when not supported by the file.
4723      *
4724      * @errors
4725      *
4726      * @param file_handle the WT_FILE_HANDLE
4727      * @param session the current WiredTiger session
4728      * @param offset offset at which to start writing
4729      * @param length amount of data to write
4730      * @param buf content to be written to the file
4731      */
4732     int (*fh_write)(WT_FILE_HANDLE *file_handle, WT_SESSION *session,
4733         wt_off_t offset, size_t length, const void *buf);
4734 };
4735 
4736 #if !defined(DOXYGEN)
4737 /* This interface is not yet public. */
4738 
4739 /*!
4740  * The interface implemented by applications to provide a storage source
4741  * implementation. This documentation refers to "object" and "bucket"
4742  * to mean a "file-like object" and a "container of objects", respectively.
4743  *
4744  * <b>Thread safety:</b> WiredTiger may invoke methods on the WT_STORAGE_SOURCE
4745  * interface from multiple threads concurrently. It is the responsibility of
4746  * the implementation to protect any shared data.
4747  *
4748  * Applications register implementations with WiredTiger by calling
4749  * WT_CONNECTION::add_storage_source.
4750  *
4751  * @snippet ex_storage_source.c WT_STORAGE_SOURCE register
4752  */
4753 struct __wt_storage_source {
4754     /*!
4755      * Create a customized file system to access the storage source
4756      * objects.
4757      *
4758      * The file system returned behaves as if objects in the specified buckets are
4759      * files in the file system.  In particular, the fs_open_file method requires
4760      * its flags argument to include either WT_FS_OPEN_CREATE or WT_FS_OPEN_READONLY.
4761      * Objects being created are not deemed to "exist" and be visible to
4762      * WT_FILE_SYSTEM::fs_exist and other file system methods until the new handle has
4763      * been closed.  Objects once created are immutable. That is, only objects that
4764      * do not already exist can be opened with the create flag, and objects that
4765      * already exist can only be opened with the readonly flag.  Only objects that
4766      * exist can be transferred to the underlying shared object storage.  This can
4767      * happen at any time after an object is created, and can be forced to happen using
4768      * WT_STORAGE_SOURCE::ss_flush.
4769      *
4770      * Additionally file handles returned by the file system behave as file handles to a
4771      * local file.  For example, WT_FILE_HANDLE::fh_sync synchronizes writes to the
4772      * local file, and does not imply any transferring of data to the shared object store.
4773      *
4774      * The directory argument to the WT_FILE_SYSTEM::fs_directory_list method is normally
4775      * the empty string as the cloud equivalent (bucket) has already been given when
4776      * customizing the file system.  If specified, the directory path is interpreted
4777      * as another prefix, which is removed from the results.
4778      *
4779      * Names used by the file system methods are generally flat.  However, in some
4780      * implementations of a file system returned by a storage source, "..", ".", "/"
4781      * may have a particular meaning, as in a POSIX file system.  We suggest that
4782      * these constructs be avoided when a caller chooses file names within the returned
4783      * file system; they may be rejected by the implementation.  Within a bucket name,
4784      * these characters may or may not be acceptable. That is implementation dependent.
4785      * In the prefix, "/" is specifically allowed, as this may have performance or
4786      * administrative benefits.  That said, within a prefix, certain combinations
4787      * involving "/" may be rejected, for example "/../".
4788      *
4789      * @errors
4790      *
4791      * @param storage_source the WT_STORAGE_SOURCE
4792      * @param session the current WiredTiger session
4793      * @param bucket_name the name of the bucket.  Use of '/' is implementation dependent.
4794      * @param prefix a prefix for each file.  If used, the prefix will be added to the
4795      *    name of each object created or otherwise accessed in the bucket.  Also, only
4796      *    objects with this prefix will be visible, and the prefix will be removed when
4797      *    listed. Prefixes may contain '/' as a separator.
4798      * @param auth_token the authorization identifier.
4799      * @param config additional configuration, currently must be NULL.
4800      * @param[out] file_system the customized file system returned
4801      */
4802     int (*ss_customize_file_system)(WT_STORAGE_SOURCE *storage_source, WT_SESSION *session,
4803         const char *bucket_name, const char *prefix, const char *auth_token, const char *config,
4804         WT_FILE_SYSTEM **file_system);
4805 
4806     /*!
4807      * Flush any existing objects that match the location and name from
4808      * local storage to shared object storage.  The implementation guarantees
4809      * that all objects that are in a created state (see WT_STORAGE_SOURCE::ss_open_object)
4810      * at the beginning of this call have been transferred when this call returns.
4811      *
4812      * @errors
4813      *
4814      * @param storage_source the WT_STORAGE_SOURCE
4815      * @param session the current WiredTiger session
4816      * @param file_system if NULL, all objects are considered, otherwise only objects
4817      *    managed by the given file system.
4818      * @param name the name of the object to flush (or NULL for all)
4819      * @param config additional configuration, currently must be NULL
4820      */
4821     int (*ss_flush)(WT_STORAGE_SOURCE *storage_source, WT_SESSION *session,
4822         WT_FILE_SYSTEM *file_system, const char *name, const char *config);
4823 
4824     /*!
4825      * A callback performed when the storage source is closed and will no
4826      * longer be accessed by the WiredTiger database.
4827      *
4828      * This method is not required and should be set to NULL when not
4829      * required by the storage source implementation.
4830      *
4831      * The WT_STORAGE_SOURCE::terminate callback is intended to allow cleanup,
4832      * the handle will not be subsequently accessed by WiredTiger.
4833      */
4834     int (*terminate)(WT_STORAGE_SOURCE *storage_source, WT_SESSION *session);
4835 };
4836 #endif
4837 
4838 /*!
4839  * Entry point to an extension, called when the extension is loaded.
4840  *
4841  * @param connection the connection handle
4842  * @param config the config information passed to WT_CONNECTION::load_extension
4843  * @errors
4844  */
4845 extern int wiredtiger_extension_init(
4846     WT_CONNECTION *connection, WT_CONFIG_ARG *config);
4847 
4848 /*!
4849  * Optional cleanup function for an extension, called during
4850  * WT_CONNECTION::close.
4851  *
4852  * @param connection the connection handle
4853  * @errors
4854  */
4855 extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
4856 
4857 /*! @} */
4858 
4859 /*!
4860  * @addtogroup wt
4861  * @{
4862  */
4863 /*!
4864  * @name Incremental backup types
4865  * @anchor backup_types
4866  * @{
4867  */
4868 /*! invalid type */
4869 #define WT_BACKUP_INVALID   0
4870 /*! whole file */
4871 #define WT_BACKUP_FILE      1
4872 /*! file range */
4873 #define WT_BACKUP_RANGE     2
4874 /*! @} */
4875 
4876 /*!
4877  * @name Log record and operation types
4878  * @anchor log_types
4879  * @{
4880  */
4881 /*
4882  * NOTE:  The values of these record types and operations must
4883  * never change because they're written into the log.  Append
4884  * any new records or operations to the appropriate set.
4885  */
4886 /*! checkpoint */
4887 #define WT_LOGREC_CHECKPOINT    0
4888 /*! transaction commit */
4889 #define WT_LOGREC_COMMIT    1
4890 /*! file sync */
4891 #define WT_LOGREC_FILE_SYNC 2
4892 /*! message */
4893 #define WT_LOGREC_MESSAGE   3
4894 /*! system/internal record */
4895 #define WT_LOGREC_SYSTEM    4
4896 /*! invalid operation */
4897 #define WT_LOGOP_INVALID    0
4898 /*! column-store put */
4899 #define WT_LOGOP_COL_PUT    1
4900 /*! column-store remove */
4901 #define WT_LOGOP_COL_REMOVE 2
4902 /*! column-store truncate */
4903 #define WT_LOGOP_COL_TRUNCATE   3
4904 /*! row-store put */
4905 #define WT_LOGOP_ROW_PUT    4
4906 /*! row-store remove */
4907 #define WT_LOGOP_ROW_REMOVE 5
4908 /*! row-store truncate */
4909 #define WT_LOGOP_ROW_TRUNCATE   6
4910 /*! checkpoint start */
4911 #define WT_LOGOP_CHECKPOINT_START   7
4912 /*! previous LSN */
4913 #define WT_LOGOP_PREV_LSN   8
4914 /*! column-store modify */
4915 #define WT_LOGOP_COL_MODIFY 9
4916 /*! row-store modify */
4917 #define WT_LOGOP_ROW_MODIFY 10
4918 /*
4919  * NOTE: Diagnostic-only log operations should have values in
4920  * the ignore range.
4921  */
4922 /*! Diagnostic: transaction timestamps */
4923 #define WT_LOGOP_TXN_TIMESTAMP  (WT_LOGOP_IGNORE | 11)
4924 /*! @} */
4925 
4926 /*******************************************
4927  * Statistic reference.
4928  *******************************************/
4929 /*
4930  * DO NOT EDIT: automatically built by dist/stat.py.
4931  * Statistics section: BEGIN
4932  */
4933 
4934 /*!
4935  * @name Connection statistics
4936  * @anchor statistics_keys
4937  * @anchor statistics_conn
4938  * Statistics are accessed through cursors with \c "statistics:" URIs.
4939  * Individual statistics can be queried through the cursor using the following
4940  * keys.  See @ref data_statistics for more information.
4941  * @{
4942  */
4943 /*! LSM: application work units currently queued */
4944 #define WT_STAT_CONN_LSM_WORK_QUEUE_APP         1000
4945 /*! LSM: merge work units currently queued */
4946 #define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER     1001
4947 /*! LSM: rows merged in an LSM tree */
4948 #define WT_STAT_CONN_LSM_ROWS_MERGED            1002
4949 /*! LSM: switch work units currently queued */
4950 #define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH      1003
4951 /*! LSM: tree maintenance operations discarded */
4952 #define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED       1004
4953 /*! LSM: tree maintenance operations executed */
4954 #define WT_STAT_CONN_LSM_WORK_UNITS_DONE        1005
4955 /*! LSM: tree maintenance operations scheduled */
4956 #define WT_STAT_CONN_LSM_WORK_UNITS_CREATED     1006
4957 /*! LSM: tree queue hit maximum */
4958 #define WT_STAT_CONN_LSM_WORK_QUEUE_MAX         1007
4959 /*! block-manager: blocks pre-loaded */
4960 #define WT_STAT_CONN_BLOCK_PRELOAD          1008
4961 /*! block-manager: blocks read */
4962 #define WT_STAT_CONN_BLOCK_READ             1009
4963 /*! block-manager: blocks written */
4964 #define WT_STAT_CONN_BLOCK_WRITE            1010
4965 /*! block-manager: bytes read */
4966 #define WT_STAT_CONN_BLOCK_BYTE_READ            1011
4967 /*! block-manager: bytes read via memory map API */
4968 #define WT_STAT_CONN_BLOCK_BYTE_READ_MMAP       1012
4969 /*! block-manager: bytes read via system call API */
4970 #define WT_STAT_CONN_BLOCK_BYTE_READ_SYSCALL        1013
4971 /*! block-manager: bytes written */
4972 #define WT_STAT_CONN_BLOCK_BYTE_WRITE           1014
4973 /*! block-manager: bytes written for checkpoint */
4974 #define WT_STAT_CONN_BLOCK_BYTE_WRITE_CHECKPOINT    1015
4975 /*! block-manager: bytes written via memory map API */
4976 #define WT_STAT_CONN_BLOCK_BYTE_WRITE_MMAP      1016
4977 /*! block-manager: bytes written via system call API */
4978 #define WT_STAT_CONN_BLOCK_BYTE_WRITE_SYSCALL       1017
4979 /*! block-manager: mapped blocks read */
4980 #define WT_STAT_CONN_BLOCK_MAP_READ         1018
4981 /*! block-manager: mapped bytes read */
4982 #define WT_STAT_CONN_BLOCK_BYTE_MAP_READ        1019
4983 /*!
4984  * block-manager: number of times the file was remapped because it
4985  * changed size via fallocate or truncate
4986  */
4987 #define WT_STAT_CONN_BLOCK_REMAP_FILE_RESIZE        1020
4988 /*! block-manager: number of times the region was remapped via write */
4989 #define WT_STAT_CONN_BLOCK_REMAP_FILE_WRITE     1021
4990 /*! cache: application threads page read from disk to cache count */
4991 #define WT_STAT_CONN_CACHE_READ_APP_COUNT       1022
4992 /*! cache: application threads page read from disk to cache time (usecs) */
4993 #define WT_STAT_CONN_CACHE_READ_APP_TIME        1023
4994 /*! cache: application threads page write from cache to disk count */
4995 #define WT_STAT_CONN_CACHE_WRITE_APP_COUNT      1024
4996 /*! cache: application threads page write from cache to disk time (usecs) */
4997 #define WT_STAT_CONN_CACHE_WRITE_APP_TIME       1025
4998 /*! cache: bytes allocated for updates */
4999 #define WT_STAT_CONN_CACHE_BYTES_UPDATES        1026
5000 /*! cache: bytes belonging to page images in the cache */
5001 #define WT_STAT_CONN_CACHE_BYTES_IMAGE          1027
5002 /*! cache: bytes belonging to the history store table in the cache */
5003 #define WT_STAT_CONN_CACHE_BYTES_HS         1028
5004 /*! cache: bytes not belonging to page images in the cache */
5005 #define WT_STAT_CONN_CACHE_BYTES_OTHER          1029
5006 /*! cache: cache overflow score */
5007 #define WT_STAT_CONN_CACHE_LOOKASIDE_SCORE      1030
5008 /*! cache: eviction calls to get a page */
5009 #define WT_STAT_CONN_CACHE_EVICTION_GET_REF     1031
5010 /*! cache: eviction calls to get a page found queue empty */
5011 #define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY   1032
5012 /*! cache: eviction calls to get a page found queue empty after locking */
5013 #define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2  1033
5014 /*! cache: eviction currently operating in aggressive mode */
5015 #define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET  1034
5016 /*! cache: eviction empty score */
5017 #define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE     1035
5018 /*! cache: eviction passes of a file */
5019 #define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES     1036
5020 /*! cache: eviction server candidate queue empty when topping up */
5021 #define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY     1037
5022 /*! cache: eviction server candidate queue not empty when topping up */
5023 #define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1038
5024 /*! cache: eviction server evicting pages */
5025 #define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1039
5026 /*!
5027  * cache: eviction server slept, because we did not make progress with
5028  * eviction
5029  */
5030 #define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT    1040
5031 /*! cache: eviction server unable to reach eviction goal */
5032 #define WT_STAT_CONN_CACHE_EVICTION_SLOW        1041
5033 /*! cache: eviction server waiting for a leaf page */
5034 #define WT_STAT_CONN_CACHE_EVICTION_WALK_LEAF_NOTFOUND  1042
5035 /*! cache: eviction state */
5036 #define WT_STAT_CONN_CACHE_EVICTION_STATE       1043
5037 /*! cache: eviction walk target strategy both clean and dirty pages */
5038 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_BOTH_CLEAN_AND_DIRTY    1044
5039 /*! cache: eviction walk target strategy only clean pages */
5040 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_CLEAN   1045
5041 /*! cache: eviction walk target strategy only dirty pages */
5042 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_STRATEGY_DIRTY   1046
5043 /*! cache: eviction worker thread active */
5044 #define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS  1047
5045 /*! cache: eviction worker thread created */
5046 #define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED  1048
5047 /*! cache: eviction worker thread evicting pages */
5048 #define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1049
5049 /*! cache: eviction worker thread removed */
5050 #define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED  1050
5051 /*! cache: eviction worker thread stable number */
5052 #define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS    1051
5053 /*! cache: files with active eviction walks */
5054 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE    1052
5055 /*! cache: files with new eviction walks started */
5056 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED   1053
5057 /*! cache: force re-tuning of eviction workers once in a while */
5058 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE    1054
5059 /*!
5060  * cache: forced eviction - history store pages failed to evict while
5061  * session has history store cursor open
5062  */
5063 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS_FAIL   1055
5064 /*!
5065  * cache: forced eviction - history store pages selected while session
5066  * has history store cursor open
5067  */
5068 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS        1056
5069 /*!
5070  * cache: forced eviction - history store pages successfully evicted
5071  * while session has history store cursor open
5072  */
5073 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_HS_SUCCESS    1057
5074 /*! cache: forced eviction - pages evicted that were clean count */
5075 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN     1058
5076 /*! cache: forced eviction - pages evicted that were clean time (usecs) */
5077 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_CLEAN_TIME    1059
5078 /*! cache: forced eviction - pages evicted that were dirty count */
5079 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY     1060
5080 /*! cache: forced eviction - pages evicted that were dirty time (usecs) */
5081 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_DIRTY_TIME    1061
5082 /*!
5083  * cache: forced eviction - pages selected because of too many deleted
5084  * items count
5085  */
5086 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE    1062
5087 /*! cache: forced eviction - pages selected count */
5088 #define WT_STAT_CONN_CACHE_EVICTION_FORCE       1063
5089 /*! cache: forced eviction - pages selected unable to be evicted count */
5090 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL      1064
5091 /*! cache: forced eviction - pages selected unable to be evicted time */
5092 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1065
5093 /*!
5094  * cache: forced eviction - session returned rollback error while force
5095  * evicting due to being oldest
5096  */
5097 #define WT_STAT_CONN_CACHE_EVICTION_FORCE_ROLLBACK  1066
5098 /*! cache: hazard pointer check calls */
5099 #define WT_STAT_CONN_CACHE_HAZARD_CHECKS        1067
5100 /*! cache: hazard pointer check entries walked */
5101 #define WT_STAT_CONN_CACHE_HAZARD_WALKS         1068
5102 /*! cache: hazard pointer maximum array length */
5103 #define WT_STAT_CONN_CACHE_HAZARD_MAX           1069
5104 /*! cache: history store score */
5105 #define WT_STAT_CONN_CACHE_HS_SCORE         1070
5106 /*! cache: history store table max on-disk size */
5107 #define WT_STAT_CONN_CACHE_HS_ONDISK_MAX        1071
5108 /*! cache: history store table on-disk size */
5109 #define WT_STAT_CONN_CACHE_HS_ONDISK            1072
5110 /*! cache: internal pages queued for eviction */
5111 #define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_QUEUED   1073
5112 /*! cache: internal pages seen by eviction walk */
5113 #define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_SEEN 1074
5114 /*! cache: internal pages seen by eviction walk that are already queued */
5115 #define WT_STAT_CONN_CACHE_EVICTION_INTERNAL_PAGES_ALREADY_QUEUED   1075
5116 /*! cache: maximum bytes configured */
5117 #define WT_STAT_CONN_CACHE_BYTES_MAX            1076
5118 /*! cache: maximum page size at eviction */
5119 #define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE   1077
5120 /*! cache: modified pages evicted by application threads */
5121 #define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY       1078
5122 /*! cache: operations timed out waiting for space in cache */
5123 #define WT_STAT_CONN_CACHE_TIMED_OUT_OPS        1079
5124 /*! cache: pages currently held in the cache */
5125 #define WT_STAT_CONN_CACHE_PAGES_INUSE          1080
5126 /*! cache: pages evicted by application threads */
5127 #define WT_STAT_CONN_CACHE_EVICTION_APP         1081
5128 /*! cache: pages evicted in parallel with checkpoint */
5129 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_IN_PARALLEL_WITH_CHECKPOINT   1082
5130 /*! cache: pages queued for eviction */
5131 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED    1083
5132 /*! cache: pages queued for eviction post lru sorting */
5133 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_POST_LRU   1084
5134 /*! cache: pages queued for urgent eviction */
5135 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1085
5136 /*! cache: pages queued for urgent eviction during walk */
5137 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1086
5138 /*!
5139  * cache: pages queued for urgent eviction from history store due to high
5140  * dirty content
5141  */
5142 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT_HS_DIRTY    1087
5143 /*! cache: pages seen by eviction walk that are already queued */
5144 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_ALREADY_QUEUED    1088
5145 /*! cache: pages selected for eviction unable to be evicted */
5146 #define WT_STAT_CONN_CACHE_EVICTION_FAIL        1089
5147 /*!
5148  * cache: pages selected for eviction unable to be evicted as the parent
5149  * page has overflow items
5150  */
5151 #define WT_STAT_CONN_CACHE_EVICTION_FAIL_PARENT_HAS_OVERFLOW_ITEMS  1090
5152 /*!
5153  * cache: pages selected for eviction unable to be evicted because of
5154  * active children on an internal page
5155  */
5156 #define WT_STAT_CONN_CACHE_EVICTION_FAIL_ACTIVE_CHILDREN_ON_AN_INTERNAL_PAGE    1091
5157 /*!
5158  * cache: pages selected for eviction unable to be evicted because of
5159  * failure in reconciliation
5160  */
5161 #define WT_STAT_CONN_CACHE_EVICTION_FAIL_IN_RECONCILIATION  1092
5162 /*! cache: pages walked for eviction */
5163 #define WT_STAT_CONN_CACHE_EVICTION_WALK        1093
5164 /*! cache: percentage overhead */
5165 #define WT_STAT_CONN_CACHE_OVERHEAD         1094
5166 /*! cache: tracked bytes belonging to internal pages in the cache */
5167 #define WT_STAT_CONN_CACHE_BYTES_INTERNAL       1095
5168 /*! cache: tracked bytes belonging to leaf pages in the cache */
5169 #define WT_STAT_CONN_CACHE_BYTES_LEAF           1096
5170 /*! cache: tracked dirty pages in the cache */
5171 #define WT_STAT_CONN_CACHE_PAGES_DIRTY          1097
5172 /*! capacity: background fsync file handles considered */
5173 #define WT_STAT_CONN_FSYNC_ALL_FH_TOTAL         1098
5174 /*! capacity: background fsync file handles synced */
5175 #define WT_STAT_CONN_FSYNC_ALL_FH           1099
5176 /*! capacity: background fsync time (msecs) */
5177 #define WT_STAT_CONN_FSYNC_ALL_TIME         1100
5178 /*! capacity: bytes read */
5179 #define WT_STAT_CONN_CAPACITY_BYTES_READ        1101
5180 /*! capacity: bytes written for checkpoint */
5181 #define WT_STAT_CONN_CAPACITY_BYTES_CKPT        1102
5182 /*! capacity: bytes written for eviction */
5183 #define WT_STAT_CONN_CAPACITY_BYTES_EVICT       1103
5184 /*! capacity: bytes written for log */
5185 #define WT_STAT_CONN_CAPACITY_BYTES_LOG         1104
5186 /*! capacity: bytes written total */
5187 #define WT_STAT_CONN_CAPACITY_BYTES_WRITTEN     1105
5188 /*! capacity: threshold to call fsync */
5189 #define WT_STAT_CONN_CAPACITY_THRESHOLD         1106
5190 /*! capacity: time waiting due to total capacity (usecs) */
5191 #define WT_STAT_CONN_CAPACITY_TIME_TOTAL        1107
5192 /*! capacity: time waiting during checkpoint (usecs) */
5193 #define WT_STAT_CONN_CAPACITY_TIME_CKPT         1108
5194 /*! capacity: time waiting during eviction (usecs) */
5195 #define WT_STAT_CONN_CAPACITY_TIME_EVICT        1109
5196 /*! capacity: time waiting during logging (usecs) */
5197 #define WT_STAT_CONN_CAPACITY_TIME_LOG          1110
5198 /*! capacity: time waiting during read (usecs) */
5199 #define WT_STAT_CONN_CAPACITY_TIME_READ         1111
5200 /*! connection: auto adjusting condition resets */
5201 #define WT_STAT_CONN_COND_AUTO_WAIT_RESET       1112
5202 /*! connection: auto adjusting condition wait calls */
5203 #define WT_STAT_CONN_COND_AUTO_WAIT         1113
5204 /*!
5205  * connection: auto adjusting condition wait raced to update timeout and
5206  * skipped updating
5207  */
5208 #define WT_STAT_CONN_COND_AUTO_WAIT_SKIPPED     1114
5209 /*! connection: detected system time went backwards */
5210 #define WT_STAT_CONN_TIME_TRAVEL            1115
5211 /*! connection: files currently open */
5212 #define WT_STAT_CONN_FILE_OPEN              1116
5213 /*! connection: hash bucket array size for data handles */
5214 #define WT_STAT_CONN_BUCKETS_DH             1117
5215 /*! connection: hash bucket array size general */
5216 #define WT_STAT_CONN_BUCKETS                1118
5217 /*! connection: memory allocations */
5218 #define WT_STAT_CONN_MEMORY_ALLOCATION          1119
5219 /*! connection: memory frees */
5220 #define WT_STAT_CONN_MEMORY_FREE            1120
5221 /*! connection: memory re-allocations */
5222 #define WT_STAT_CONN_MEMORY_GROW            1121
5223 /*! connection: pthread mutex condition wait calls */
5224 #define WT_STAT_CONN_COND_WAIT              1122
5225 /*! connection: pthread mutex shared lock read-lock calls */
5226 #define WT_STAT_CONN_RWLOCK_READ            1123
5227 /*! connection: pthread mutex shared lock write-lock calls */
5228 #define WT_STAT_CONN_RWLOCK_WRITE           1124
5229 /*! connection: total fsync I/Os */
5230 #define WT_STAT_CONN_FSYNC_IO               1125
5231 /*! connection: total read I/Os */
5232 #define WT_STAT_CONN_READ_IO                1126
5233 /*! connection: total write I/Os */
5234 #define WT_STAT_CONN_WRITE_IO               1127
5235 /*! cursor: cached cursor count */
5236 #define WT_STAT_CONN_CURSOR_CACHED_COUNT        1128
5237 /*! cursor: cursor bulk loaded cursor insert calls */
5238 #define WT_STAT_CONN_CURSOR_INSERT_BULK         1129
5239 /*! cursor: cursor close calls that result in cache */
5240 #define WT_STAT_CONN_CURSOR_CACHE           1130
5241 /*! cursor: cursor create calls */
5242 #define WT_STAT_CONN_CURSOR_CREATE          1131
5243 /*! cursor: cursor insert calls */
5244 #define WT_STAT_CONN_CURSOR_INSERT          1132
5245 /*! cursor: cursor insert key and value bytes */
5246 #define WT_STAT_CONN_CURSOR_INSERT_BYTES        1133
5247 /*! cursor: cursor modify calls */
5248 #define WT_STAT_CONN_CURSOR_MODIFY          1134
5249 /*! cursor: cursor modify key and value bytes affected */
5250 #define WT_STAT_CONN_CURSOR_MODIFY_BYTES        1135
5251 /*! cursor: cursor modify value bytes modified */
5252 #define WT_STAT_CONN_CURSOR_MODIFY_BYTES_TOUCH      1136
5253 /*! cursor: cursor next calls */
5254 #define WT_STAT_CONN_CURSOR_NEXT            1137
5255 /*! cursor: cursor operation restarted */
5256 #define WT_STAT_CONN_CURSOR_RESTART         1138
5257 /*! cursor: cursor prev calls */
5258 #define WT_STAT_CONN_CURSOR_PREV            1139
5259 /*! cursor: cursor remove calls */
5260 #define WT_STAT_CONN_CURSOR_REMOVE          1140
5261 /*! cursor: cursor remove key bytes removed */
5262 #define WT_STAT_CONN_CURSOR_REMOVE_BYTES        1141
5263 /*! cursor: cursor reserve calls */
5264 #define WT_STAT_CONN_CURSOR_RESERVE         1142
5265 /*! cursor: cursor reset calls */
5266 #define WT_STAT_CONN_CURSOR_RESET           1143
5267 /*! cursor: cursor search calls */
5268 #define WT_STAT_CONN_CURSOR_SEARCH          1144
5269 /*! cursor: cursor search history store calls */
5270 #define WT_STAT_CONN_CURSOR_SEARCH_HS           1145
5271 /*! cursor: cursor search near calls */
5272 #define WT_STAT_CONN_CURSOR_SEARCH_NEAR         1146
5273 /*! cursor: cursor sweep buckets */
5274 #define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS       1147
5275 /*! cursor: cursor sweep cursors closed */
5276 #define WT_STAT_CONN_CURSOR_SWEEP_CLOSED        1148
5277 /*! cursor: cursor sweep cursors examined */
5278 #define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED      1149
5279 /*! cursor: cursor sweeps */
5280 #define WT_STAT_CONN_CURSOR_SWEEP           1150
5281 /*! cursor: cursor truncate calls */
5282 #define WT_STAT_CONN_CURSOR_TRUNCATE            1151
5283 /*! cursor: cursor update calls */
5284 #define WT_STAT_CONN_CURSOR_UPDATE          1152
5285 /*! cursor: cursor update key and value bytes */
5286 #define WT_STAT_CONN_CURSOR_UPDATE_BYTES        1153
5287 /*! cursor: cursor update value size change */
5288 #define WT_STAT_CONN_CURSOR_UPDATE_BYTES_CHANGED    1154
5289 /*! cursor: cursors reused from cache */
5290 #define WT_STAT_CONN_CURSOR_REOPEN          1155
5291 /*! data-handle: connection data handle size */
5292 #define WT_STAT_CONN_DH_CONN_HANDLE_SIZE        1156
5293 /*! data-handle: connection data handles currently active */
5294 #define WT_STAT_CONN_DH_CONN_HANDLE_COUNT       1157
5295 /*! data-handle: connection sweep candidate became referenced */
5296 #define WT_STAT_CONN_DH_SWEEP_REF           1158
5297 /*! data-handle: connection sweep dhandles closed */
5298 #define WT_STAT_CONN_DH_SWEEP_CLOSE         1159
5299 /*! data-handle: connection sweep dhandles removed from hash list */
5300 #define WT_STAT_CONN_DH_SWEEP_REMOVE            1160
5301 /*! data-handle: connection sweep time-of-death sets */
5302 #define WT_STAT_CONN_DH_SWEEP_TOD           1161
5303 /*! data-handle: connection sweeps */
5304 #define WT_STAT_CONN_DH_SWEEPS              1162
5305 /*!
5306  * data-handle: connection sweeps skipped due to checkpoint gathering
5307  * handles
5308  */
5309 #define WT_STAT_CONN_DH_SWEEP_SKIP_CKPT         1163
5310 /*! data-handle: session dhandles swept */
5311 #define WT_STAT_CONN_DH_SESSION_HANDLES         1164
5312 /*! data-handle: session sweep attempts */
5313 #define WT_STAT_CONN_DH_SESSION_SWEEPS          1165
5314 /*! lock: checkpoint lock acquisitions */
5315 #define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT      1166
5316 /*! lock: checkpoint lock application thread wait time (usecs) */
5317 #define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION   1167
5318 /*! lock: checkpoint lock internal thread wait time (usecs) */
5319 #define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL  1168
5320 /*! lock: dhandle lock application thread time waiting (usecs) */
5321 #define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION  1169
5322 /*! lock: dhandle lock internal thread time waiting (usecs) */
5323 #define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL     1170
5324 /*! lock: dhandle read lock acquisitions */
5325 #define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT        1171
5326 /*! lock: dhandle write lock acquisitions */
5327 #define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT       1172
5328 /*!
5329  * lock: durable timestamp queue lock application thread time waiting
5330  * (usecs)
5331  */
5332 #define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_APPLICATION    1173
5333 /*!
5334  * lock: durable timestamp queue lock internal thread time waiting
5335  * (usecs)
5336  */
5337 #define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WAIT_INTERNAL   1174
5338 /*! lock: durable timestamp queue read lock acquisitions */
5339 #define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_READ_COUNT  1175
5340 /*! lock: durable timestamp queue write lock acquisitions */
5341 #define WT_STAT_CONN_LOCK_DURABLE_TIMESTAMP_WRITE_COUNT 1176
5342 /*! lock: metadata lock acquisitions */
5343 #define WT_STAT_CONN_LOCK_METADATA_COUNT        1177
5344 /*! lock: metadata lock application thread wait time (usecs) */
5345 #define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1178
5346 /*! lock: metadata lock internal thread wait time (usecs) */
5347 #define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL    1179
5348 /*!
5349  * lock: read timestamp queue lock application thread time waiting
5350  * (usecs)
5351  */
5352 #define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION   1180
5353 /*! lock: read timestamp queue lock internal thread time waiting (usecs) */
5354 #define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL  1181
5355 /*! lock: read timestamp queue read lock acquisitions */
5356 #define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1182
5357 /*! lock: read timestamp queue write lock acquisitions */
5358 #define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT    1183
5359 /*! lock: schema lock acquisitions */
5360 #define WT_STAT_CONN_LOCK_SCHEMA_COUNT          1184
5361 /*! lock: schema lock application thread wait time (usecs) */
5362 #define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION   1185
5363 /*! lock: schema lock internal thread wait time (usecs) */
5364 #define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL      1186
5365 /*!
5366  * lock: table lock application thread time waiting for the table lock
5367  * (usecs)
5368  */
5369 #define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION    1187
5370 /*!
5371  * lock: table lock internal thread time waiting for the table lock
5372  * (usecs)
5373  */
5374 #define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL       1188
5375 /*! lock: table read lock acquisitions */
5376 #define WT_STAT_CONN_LOCK_TABLE_READ_COUNT      1189
5377 /*! lock: table write lock acquisitions */
5378 #define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT     1190
5379 /*! lock: txn global lock application thread time waiting (usecs) */
5380 #define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION   1191
5381 /*! lock: txn global lock internal thread time waiting (usecs) */
5382 #define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL  1192
5383 /*! lock: txn global read lock acquisitions */
5384 #define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT     1193
5385 /*! lock: txn global write lock acquisitions */
5386 #define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT    1194
5387 /*! log: busy returns attempting to switch slots */
5388 #define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY       1195
5389 /*! log: force archive time sleeping (usecs) */
5390 #define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP        1196
5391 /*! log: log bytes of payload data */
5392 #define WT_STAT_CONN_LOG_BYTES_PAYLOAD          1197
5393 /*! log: log bytes written */
5394 #define WT_STAT_CONN_LOG_BYTES_WRITTEN          1198
5395 /*! log: log files manually zero-filled */
5396 #define WT_STAT_CONN_LOG_ZERO_FILLS         1199
5397 /*! log: log flush operations */
5398 #define WT_STAT_CONN_LOG_FLUSH              1200
5399 /*! log: log force write operations */
5400 #define WT_STAT_CONN_LOG_FORCE_WRITE            1201
5401 /*! log: log force write operations skipped */
5402 #define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP       1202
5403 /*! log: log records compressed */
5404 #define WT_STAT_CONN_LOG_COMPRESS_WRITES        1203
5405 /*! log: log records not compressed */
5406 #define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS       1204
5407 /*! log: log records too small to compress */
5408 #define WT_STAT_CONN_LOG_COMPRESS_SMALL         1205
5409 /*! log: log release advances write LSN */
5410 #define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN      1206
5411 /*! log: log scan operations */
5412 #define WT_STAT_CONN_LOG_SCANS              1207
5413 /*! log: log scan records requiring two reads */
5414 #define WT_STAT_CONN_LOG_SCAN_REREADS           1208
5415 /*! log: log server thread advances write LSN */
5416 #define WT_STAT_CONN_LOG_WRITE_LSN          1209
5417 /*! log: log server thread write LSN walk skipped */
5418 #define WT_STAT_CONN_LOG_WRITE_LSN_SKIP         1210
5419 /*! log: log sync operations */
5420 #define WT_STAT_CONN_LOG_SYNC               1211
5421 /*! log: log sync time duration (usecs) */
5422 #define WT_STAT_CONN_LOG_SYNC_DURATION          1212
5423 /*! log: log sync_dir operations */
5424 #define WT_STAT_CONN_LOG_SYNC_DIR           1213
5425 /*! log: log sync_dir time duration (usecs) */
5426 #define WT_STAT_CONN_LOG_SYNC_DIR_DURATION      1214
5427 /*! log: log write operations */
5428 #define WT_STAT_CONN_LOG_WRITES             1215
5429 /*! log: logging bytes consolidated */
5430 #define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED      1216
5431 /*! log: maximum log file size */
5432 #define WT_STAT_CONN_LOG_MAX_FILESIZE           1217
5433 /*! log: number of pre-allocated log files to create */
5434 #define WT_STAT_CONN_LOG_PREALLOC_MAX           1218
5435 /*! log: pre-allocated log files not ready and missed */
5436 #define WT_STAT_CONN_LOG_PREALLOC_MISSED        1219
5437 /*! log: pre-allocated log files prepared */
5438 #define WT_STAT_CONN_LOG_PREALLOC_FILES         1220
5439 /*! log: pre-allocated log files used */
5440 #define WT_STAT_CONN_LOG_PREALLOC_USED          1221
5441 /*! log: records processed by log scan */
5442 #define WT_STAT_CONN_LOG_SCAN_RECORDS           1222
5443 /*! log: slot close lost race */
5444 #define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE        1223
5445 /*! log: slot close unbuffered waits */
5446 #define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF       1224
5447 /*! log: slot closures */
5448 #define WT_STAT_CONN_LOG_SLOT_CLOSES            1225
5449 /*! log: slot join atomic update races */
5450 #define WT_STAT_CONN_LOG_SLOT_RACES         1226
5451 /*! log: slot join calls atomic updates raced */
5452 #define WT_STAT_CONN_LOG_SLOT_YIELD_RACE        1227
5453 /*! log: slot join calls did not yield */
5454 #define WT_STAT_CONN_LOG_SLOT_IMMEDIATE         1228
5455 /*! log: slot join calls found active slot closed */
5456 #define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE       1229
5457 /*! log: slot join calls slept */
5458 #define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP       1230
5459 /*! log: slot join calls yielded */
5460 #define WT_STAT_CONN_LOG_SLOT_YIELD         1231
5461 /*! log: slot join found active slot closed */
5462 #define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED     1232
5463 /*! log: slot joins yield time (usecs) */
5464 #define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION        1233
5465 /*! log: slot transitions unable to find free slot */
5466 #define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS     1234
5467 /*! log: slot unbuffered writes */
5468 #define WT_STAT_CONN_LOG_SLOT_UNBUFFERED        1235
5469 /*! log: total in-memory size of compressed records */
5470 #define WT_STAT_CONN_LOG_COMPRESS_MEM           1236
5471 /*! log: total log buffer size */
5472 #define WT_STAT_CONN_LOG_BUFFER_SIZE            1237
5473 /*! log: total size of compressed records */
5474 #define WT_STAT_CONN_LOG_COMPRESS_LEN           1238
5475 /*! log: written slots coalesced */
5476 #define WT_STAT_CONN_LOG_SLOT_COALESCED         1239
5477 /*! log: yields waiting for previous log file close */
5478 #define WT_STAT_CONN_LOG_CLOSE_YIELDS           1240
5479 /*! perf: file system read latency histogram (bucket 1) - 10-49ms */
5480 #define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50  1241
5481 /*! perf: file system read latency histogram (bucket 2) - 50-99ms */
5482 #define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1242
5483 /*! perf: file system read latency histogram (bucket 3) - 100-249ms */
5484 #define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1243
5485 /*! perf: file system read latency histogram (bucket 4) - 250-499ms */
5486 #define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1244
5487 /*! perf: file system read latency histogram (bucket 5) - 500-999ms */
5488 #define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000    1245
5489 /*! perf: file system read latency histogram (bucket 6) - 1000ms+ */
5490 #define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000    1246
5491 /*! perf: file system write latency histogram (bucket 1) - 10-49ms */
5492 #define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1247
5493 /*! perf: file system write latency histogram (bucket 2) - 50-99ms */
5494 #define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100    1248
5495 /*! perf: file system write latency histogram (bucket 3) - 100-249ms */
5496 #define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250    1249
5497 /*! perf: file system write latency histogram (bucket 4) - 250-499ms */
5498 #define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500    1250
5499 /*! perf: file system write latency histogram (bucket 5) - 500-999ms */
5500 #define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000   1251
5501 /*! perf: file system write latency histogram (bucket 6) - 1000ms+ */
5502 #define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000   1252
5503 /*! perf: operation read latency histogram (bucket 1) - 100-249us */
5504 #define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1253
5505 /*! perf: operation read latency histogram (bucket 2) - 250-499us */
5506 #define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1254
5507 /*! perf: operation read latency histogram (bucket 3) - 500-999us */
5508 #define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000    1255
5509 /*! perf: operation read latency histogram (bucket 4) - 1000-9999us */
5510 #define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000   1256
5511 /*! perf: operation read latency histogram (bucket 5) - 10000us+ */
5512 #define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000   1257
5513 /*! perf: operation write latency histogram (bucket 1) - 100-249us */
5514 #define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250    1258
5515 /*! perf: operation write latency histogram (bucket 2) - 250-499us */
5516 #define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500    1259
5517 /*! perf: operation write latency histogram (bucket 3) - 500-999us */
5518 #define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000   1260
5519 /*! perf: operation write latency histogram (bucket 4) - 1000-9999us */
5520 #define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000  1261
5521 /*! perf: operation write latency histogram (bucket 5) - 10000us+ */
5522 #define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000  1262
5523 /*! reconciliation: internal-page overflow keys */
5524 #define WT_STAT_CONN_REC_OVERFLOW_KEY_INTERNAL      1263
5525 /*! reconciliation: leaf-page overflow keys */
5526 #define WT_STAT_CONN_REC_OVERFLOW_KEY_LEAF      1264
5527 /*! reconciliation: maximum seconds spent in a reconciliation call */
5528 #define WT_STAT_CONN_REC_MAXIMUM_SECONDS        1265
5529 /*!
5530  * reconciliation: page reconciliation calls that resulted in values with
5531  * prepared transaction metadata
5532  */
5533 #define WT_STAT_CONN_REC_PAGES_WITH_PREPARE     1266
5534 /*!
5535  * reconciliation: page reconciliation calls that resulted in values with
5536  * timestamps
5537  */
5538 #define WT_STAT_CONN_REC_PAGES_WITH_TS          1267
5539 /*!
5540  * reconciliation: page reconciliation calls that resulted in values with
5541  * transaction ids
5542  */
5543 #define WT_STAT_CONN_REC_PAGES_WITH_TXN         1268
5544 /*! reconciliation: pages written including at least one prepare state */
5545 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_PREPARED 1269
5546 /*! reconciliation: pages written including at least one start timestamp */
5547 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TS 1270
5548 /*! reconciliation: records written including a prepare state */
5549 #define WT_STAT_CONN_REC_TIME_WINDOW_PREPARED       1271
5550 /*! reconciliation: split bytes currently awaiting free */
5551 #define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES        1272
5552 /*! reconciliation: split objects currently awaiting free */
5553 #define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS      1273
5554 /*! session: flush_tier operation calls */
5555 #define WT_STAT_CONN_FLUSH_TIER             1274
5556 /*! session: open session count */
5557 #define WT_STAT_CONN_SESSION_OPEN           1275
5558 /*! session: session query timestamp calls */
5559 #define WT_STAT_CONN_SESSION_QUERY_TS           1276
5560 /*! session: table alter failed calls */
5561 #define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL       1277
5562 /*! session: table alter successful calls */
5563 #define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS    1278
5564 /*! session: table alter unchanged and skipped */
5565 #define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP       1279
5566 /*! session: table compact failed calls */
5567 #define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL     1280
5568 /*! session: table compact successful calls */
5569 #define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS  1281
5570 /*! session: table create failed calls */
5571 #define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL      1282
5572 /*! session: table create successful calls */
5573 #define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS   1283
5574 /*! session: table drop failed calls */
5575 #define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL        1284
5576 /*! session: table drop successful calls */
5577 #define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS     1285
5578 /*! session: table rename failed calls */
5579 #define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL      1286
5580 /*! session: table rename successful calls */
5581 #define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS   1287
5582 /*! session: table salvage failed calls */
5583 #define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL     1288
5584 /*! session: table salvage successful calls */
5585 #define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS  1289
5586 /*! session: table truncate failed calls */
5587 #define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL    1290
5588 /*! session: table truncate successful calls */
5589 #define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1291
5590 /*! session: table verify failed calls */
5591 #define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL      1292
5592 /*! session: table verify successful calls */
5593 #define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS   1293
5594 /*! thread-state: active filesystem fsync calls */
5595 #define WT_STAT_CONN_THREAD_FSYNC_ACTIVE        1294
5596 /*! thread-state: active filesystem read calls */
5597 #define WT_STAT_CONN_THREAD_READ_ACTIVE         1295
5598 /*! thread-state: active filesystem write calls */
5599 #define WT_STAT_CONN_THREAD_WRITE_ACTIVE        1296
5600 /*! thread-yield: application thread time evicting (usecs) */
5601 #define WT_STAT_CONN_APPLICATION_EVICT_TIME     1297
5602 /*! thread-yield: application thread time waiting for cache (usecs) */
5603 #define WT_STAT_CONN_APPLICATION_CACHE_TIME     1298
5604 /*!
5605  * thread-yield: connection close blocked waiting for transaction state
5606  * stabilization
5607  */
5608 #define WT_STAT_CONN_TXN_RELEASE_BLOCKED        1299
5609 /*! thread-yield: connection close yielded for lsm manager shutdown */
5610 #define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM     1300
5611 /*! thread-yield: data handle lock yielded */
5612 #define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED       1301
5613 /*!
5614  * thread-yield: get reference for page index and slot time sleeping
5615  * (usecs)
5616  */
5617 #define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED    1302
5618 /*! thread-yield: log server sync yielded for log write */
5619 #define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED        1303
5620 /*! thread-yield: page access yielded due to prepare state change */
5621 #define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE   1304
5622 /*! thread-yield: page acquire busy blocked */
5623 #define WT_STAT_CONN_PAGE_BUSY_BLOCKED          1305
5624 /*! thread-yield: page acquire eviction blocked */
5625 #define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED    1306
5626 /*! thread-yield: page acquire locked blocked */
5627 #define WT_STAT_CONN_PAGE_LOCKED_BLOCKED        1307
5628 /*! thread-yield: page acquire read blocked */
5629 #define WT_STAT_CONN_PAGE_READ_BLOCKED          1308
5630 /*! thread-yield: page acquire time sleeping (usecs) */
5631 #define WT_STAT_CONN_PAGE_SLEEP             1309
5632 /*!
5633  * thread-yield: page delete rollback time sleeping for state change
5634  * (usecs)
5635  */
5636 #define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED      1310
5637 /*! thread-yield: page reconciliation yielded due to child modification */
5638 #define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE      1311
5639 /*! transaction: Number of prepared updates */
5640 #define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT     1312
5641 /*! transaction: prepared transactions */
5642 #define WT_STAT_CONN_TXN_PREPARE            1313
5643 /*! transaction: prepared transactions committed */
5644 #define WT_STAT_CONN_TXN_PREPARE_COMMIT         1314
5645 /*! transaction: prepared transactions currently active */
5646 #define WT_STAT_CONN_TXN_PREPARE_ACTIVE         1315
5647 /*! transaction: prepared transactions rolled back */
5648 #define WT_STAT_CONN_TXN_PREPARE_ROLLBACK       1316
5649 /*! transaction: query timestamp calls */
5650 #define WT_STAT_CONN_TXN_QUERY_TS           1317
5651 /*! transaction: rollback to stable calls */
5652 #define WT_STAT_CONN_TXN_RTS                1318
5653 /*! transaction: rollback to stable pages visited */
5654 #define WT_STAT_CONN_TXN_RTS_PAGES_VISITED      1319
5655 /*! transaction: rollback to stable tree walk skipping pages */
5656 #define WT_STAT_CONN_TXN_RTS_TREE_WALK_SKIP_PAGES   1320
5657 /*! transaction: rollback to stable updates aborted */
5658 #define WT_STAT_CONN_TXN_RTS_UPD_ABORTED        1321
5659 /*! transaction: set timestamp calls */
5660 #define WT_STAT_CONN_TXN_SET_TS             1322
5661 /*! transaction: set timestamp durable calls */
5662 #define WT_STAT_CONN_TXN_SET_TS_DURABLE         1323
5663 /*! transaction: set timestamp durable updates */
5664 #define WT_STAT_CONN_TXN_SET_TS_DURABLE_UPD     1324
5665 /*! transaction: set timestamp oldest calls */
5666 #define WT_STAT_CONN_TXN_SET_TS_OLDEST          1325
5667 /*! transaction: set timestamp oldest updates */
5668 #define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD      1326
5669 /*! transaction: set timestamp stable calls */
5670 #define WT_STAT_CONN_TXN_SET_TS_STABLE          1327
5671 /*! transaction: set timestamp stable updates */
5672 #define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD      1328
5673 /*! transaction: transaction begins */
5674 #define WT_STAT_CONN_TXN_BEGIN              1329
5675 /*! transaction: transaction checkpoint currently running */
5676 #define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING     1330
5677 /*! transaction: transaction checkpoint generation */
5678 #define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION      1331
5679 /*!
5680  * transaction: transaction checkpoint history store file duration
5681  * (usecs)
5682  */
5683 #define WT_STAT_CONN_TXN_HS_CKPT_DURATION       1332
5684 /*! transaction: transaction checkpoint max time (msecs) */
5685 #define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX        1333
5686 /*! transaction: transaction checkpoint min time (msecs) */
5687 #define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN        1334
5688 /*!
5689  * transaction: transaction checkpoint most recent duration for gathering
5690  * all handles (usecs)
5691  */
5692 #define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION 1335
5693 /*!
5694  * transaction: transaction checkpoint most recent duration for gathering
5695  * applied handles (usecs)
5696  */
5697 #define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_APPLY   1336
5698 /*!
5699  * transaction: transaction checkpoint most recent duration for gathering
5700  * skipped handles (usecs)
5701  */
5702 #define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_DURATION_SKIP    1337
5703 /*! transaction: transaction checkpoint most recent handles applied */
5704 #define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_APPLIED  1338
5705 /*! transaction: transaction checkpoint most recent handles skipped */
5706 #define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_SKIPPED  1339
5707 /*! transaction: transaction checkpoint most recent handles walked */
5708 #define WT_STAT_CONN_TXN_CHECKPOINT_HANDLE_WALKED   1340
5709 /*! transaction: transaction checkpoint most recent time (msecs) */
5710 #define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT     1341
5711 /*! transaction: transaction checkpoint prepare currently running */
5712 #define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RUNNING    1342
5713 /*! transaction: transaction checkpoint prepare max time (msecs) */
5714 #define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MAX        1343
5715 /*! transaction: transaction checkpoint prepare min time (msecs) */
5716 #define WT_STAT_CONN_TXN_CHECKPOINT_PREP_MIN        1344
5717 /*! transaction: transaction checkpoint prepare most recent time (msecs) */
5718 #define WT_STAT_CONN_TXN_CHECKPOINT_PREP_RECENT     1345
5719 /*! transaction: transaction checkpoint prepare total time (msecs) */
5720 #define WT_STAT_CONN_TXN_CHECKPOINT_PREP_TOTAL      1346
5721 /*! transaction: transaction checkpoint scrub dirty target */
5722 #define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET    1347
5723 /*! transaction: transaction checkpoint scrub time (msecs) */
5724 #define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME      1348
5725 /*! transaction: transaction checkpoint total time (msecs) */
5726 #define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL      1349
5727 /*! transaction: transaction checkpoints */
5728 #define WT_STAT_CONN_TXN_CHECKPOINT         1350
5729 /*!
5730  * transaction: transaction checkpoints skipped because database was
5731  * clean
5732  */
5733 #define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED     1351
5734 /*! transaction: transaction failures due to history store */
5735 #define WT_STAT_CONN_TXN_FAIL_CACHE         1352
5736 /*!
5737  * transaction: transaction fsync calls for checkpoint after allocating
5738  * the transaction ID
5739  */
5740 #define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST      1353
5741 /*!
5742  * transaction: transaction fsync duration for checkpoint after
5743  * allocating the transaction ID (usecs)
5744  */
5745 #define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1354
5746 /*! transaction: transaction range of IDs currently pinned */
5747 #define WT_STAT_CONN_TXN_PINNED_RANGE           1355
5748 /*! transaction: transaction range of IDs currently pinned by a checkpoint */
5749 #define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE    1356
5750 /*! transaction: transaction range of timestamps currently pinned */
5751 #define WT_STAT_CONN_TXN_PINNED_TIMESTAMP       1357
5752 /*! transaction: transaction range of timestamps pinned by a checkpoint */
5753 #define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT    1358
5754 /*!
5755  * transaction: transaction range of timestamps pinned by the oldest
5756  * active read timestamp
5757  */
5758 #define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_READER    1359
5759 /*!
5760  * transaction: transaction range of timestamps pinned by the oldest
5761  * timestamp
5762  */
5763 #define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST    1360
5764 /*! transaction: transaction read timestamp of the oldest active reader */
5765 #define WT_STAT_CONN_TXN_TIMESTAMP_OLDEST_ACTIVE_READ   1361
5766 /*! transaction: transaction sync calls */
5767 #define WT_STAT_CONN_TXN_SYNC               1362
5768 /*! transaction: transaction walk of concurrent sessions */
5769 #define WT_STAT_CONN_TXN_WALK_SESSIONS          1363
5770 /*! transaction: transactions committed */
5771 #define WT_STAT_CONN_TXN_COMMIT             1364
5772 /*! transaction: transactions rolled back */
5773 #define WT_STAT_CONN_TXN_ROLLBACK           1365
5774 /*! LSM: sleep for LSM checkpoint throttle */
5775 #define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE        1366
5776 /*! LSM: sleep for LSM merge throttle */
5777 #define WT_STAT_CONN_LSM_MERGE_THROTTLE         1367
5778 /*! cache: bytes currently in the cache */
5779 #define WT_STAT_CONN_CACHE_BYTES_INUSE          1368
5780 /*! cache: bytes dirty in the cache cumulative */
5781 #define WT_STAT_CONN_CACHE_BYTES_DIRTY_TOTAL        1369
5782 /*! cache: bytes read into cache */
5783 #define WT_STAT_CONN_CACHE_BYTES_READ           1370
5784 /*! cache: bytes written from cache */
5785 #define WT_STAT_CONN_CACHE_BYTES_WRITE          1371
5786 /*! cache: checkpoint blocked page eviction */
5787 #define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT      1372
5788 /*! cache: eviction walk target pages histogram - 0-9 */
5789 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10    1373
5790 /*! cache: eviction walk target pages histogram - 10-31 */
5791 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32    1374
5792 /*! cache: eviction walk target pages histogram - 128 and higher */
5793 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128   1375
5794 /*! cache: eviction walk target pages histogram - 32-63 */
5795 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64    1376
5796 /*! cache: eviction walk target pages histogram - 64-128 */
5797 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128   1377
5798 /*!
5799  * cache: eviction walk target pages reduced due to history store cache
5800  * pressure
5801  */
5802 #define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_REDUCED 1378
5803 /*! cache: eviction walks abandoned */
5804 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1379
5805 /*! cache: eviction walks gave up because they restarted their walk twice */
5806 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED   1380
5807 /*!
5808  * cache: eviction walks gave up because they saw too many pages and
5809  * found no candidates
5810  */
5811 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS    1381
5812 /*!
5813  * cache: eviction walks gave up because they saw too many pages and
5814  * found too few candidates
5815  */
5816 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 1382
5817 /*! cache: eviction walks reached end of tree */
5818 #define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED     1383
5819 /*! cache: eviction walks restarted */
5820 #define WT_STAT_CONN_CACHE_EVICTION_WALK_RESTART    1384
5821 /*! cache: eviction walks started from root of tree */
5822 #define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT  1385
5823 /*! cache: eviction walks started from saved location in tree */
5824 #define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS  1386
5825 /*! cache: hazard pointer blocked page eviction */
5826 #define WT_STAT_CONN_CACHE_EVICTION_HAZARD      1387
5827 /*! cache: history store table insert calls */
5828 #define WT_STAT_CONN_CACHE_HS_INSERT            1388
5829 /*! cache: history store table insert calls that returned restart */
5830 #define WT_STAT_CONN_CACHE_HS_INSERT_RESTART        1389
5831 /*!
5832  * cache: history store table out-of-order resolved updates that lose
5833  * their durable timestamp
5834  */
5835 #define WT_STAT_CONN_CACHE_HS_ORDER_LOSE_DURABLE_TIMESTAMP  1390
5836 /*!
5837  * cache: history store table out-of-order updates that were fixed up by
5838  * moving existing records
5839  */
5840 #define WT_STAT_CONN_CACHE_HS_ORDER_FIXUP_MOVE      1391
5841 /*!
5842  * cache: history store table out-of-order updates that were fixed up
5843  * during insertion
5844  */
5845 #define WT_STAT_CONN_CACHE_HS_ORDER_FIXUP_INSERT    1392
5846 /*! cache: history store table reads */
5847 #define WT_STAT_CONN_CACHE_HS_READ          1393
5848 /*! cache: history store table reads missed */
5849 #define WT_STAT_CONN_CACHE_HS_READ_MISS         1394
5850 /*! cache: history store table reads requiring squashed modifies */
5851 #define WT_STAT_CONN_CACHE_HS_READ_SQUASH       1395
5852 /*!
5853  * cache: history store table truncation by rollback to stable to remove
5854  * an unstable update
5855  */
5856 #define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_RTS_UNSTABLE 1396
5857 /*!
5858  * cache: history store table truncation by rollback to stable to remove
5859  * an update
5860  */
5861 #define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_RTS      1397
5862 /*! cache: history store table truncation to remove an update */
5863 #define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE      1398
5864 /*!
5865  * cache: history store table truncation to remove range of updates due
5866  * to key being removed from the data page during reconciliation
5867  */
5868 #define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL   1399
5869 /*!
5870  * cache: history store table truncation to remove range of updates due
5871  * to non timestamped update on data page
5872  */
5873 #define WT_STAT_CONN_CACHE_HS_KEY_TRUNCATE_NON_TS   1400
5874 /*! cache: history store table writes requiring squashed modifies */
5875 #define WT_STAT_CONN_CACHE_HS_WRITE_SQUASH      1401
5876 /*! cache: in-memory page passed criteria to be split */
5877 #define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE     1402
5878 /*! cache: in-memory page splits */
5879 #define WT_STAT_CONN_CACHE_INMEM_SPLIT          1403
5880 /*! cache: internal pages evicted */
5881 #define WT_STAT_CONN_CACHE_EVICTION_INTERNAL        1404
5882 /*! cache: internal pages split during eviction */
5883 #define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL  1405
5884 /*! cache: leaf pages split during eviction */
5885 #define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF      1406
5886 /*! cache: modified pages evicted */
5887 #define WT_STAT_CONN_CACHE_EVICTION_DIRTY       1407
5888 /*! cache: overflow pages read into cache */
5889 #define WT_STAT_CONN_CACHE_READ_OVERFLOW        1408
5890 /*! cache: page split during eviction deepened the tree */
5891 #define WT_STAT_CONN_CACHE_EVICTION_DEEPEN      1409
5892 /*! cache: page written requiring history store records */
5893 #define WT_STAT_CONN_CACHE_WRITE_HS         1410
5894 /*! cache: pages read into cache */
5895 #define WT_STAT_CONN_CACHE_READ             1411
5896 /*! cache: pages read into cache after truncate */
5897 #define WT_STAT_CONN_CACHE_READ_DELETED         1412
5898 /*! cache: pages read into cache after truncate in prepare state */
5899 #define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED    1413
5900 /*! cache: pages requested from the cache */
5901 #define WT_STAT_CONN_CACHE_PAGES_REQUESTED      1414
5902 /*! cache: pages seen by eviction walk */
5903 #define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN      1415
5904 /*! cache: pages written from cache */
5905 #define WT_STAT_CONN_CACHE_WRITE            1416
5906 /*! cache: pages written requiring in-memory restoration */
5907 #define WT_STAT_CONN_CACHE_WRITE_RESTORE        1417
5908 /*! cache: tracked dirty bytes in the cache */
5909 #define WT_STAT_CONN_CACHE_BYTES_DIRTY          1418
5910 /*! cache: unmodified pages evicted */
5911 #define WT_STAT_CONN_CACHE_EVICTION_CLEAN       1419
5912 /*! checkpoint-cleanup: pages added for eviction */
5913 #define WT_STAT_CONN_CC_PAGES_EVICT         1420
5914 /*! checkpoint-cleanup: pages removed */
5915 #define WT_STAT_CONN_CC_PAGES_REMOVED           1421
5916 /*! checkpoint-cleanup: pages skipped during tree walk */
5917 #define WT_STAT_CONN_CC_PAGES_WALK_SKIPPED      1422
5918 /*! checkpoint-cleanup: pages visited */
5919 #define WT_STAT_CONN_CC_PAGES_VISITED           1423
5920 /*! cursor: Total number of entries skipped by cursor next calls */
5921 #define WT_STAT_CONN_CURSOR_NEXT_SKIP_TOTAL     1424
5922 /*! cursor: Total number of entries skipped by cursor prev calls */
5923 #define WT_STAT_CONN_CURSOR_PREV_SKIP_TOTAL     1425
5924 /*!
5925  * cursor: Total number of entries skipped to position the history store
5926  * cursor
5927  */
5928 #define WT_STAT_CONN_CURSOR_SKIP_HS_CUR_POSITION    1426
5929 /*!
5930  * cursor: cursor next calls that skip due to a globally visible history
5931  * store tombstone
5932  */
5933 #define WT_STAT_CONN_CURSOR_NEXT_HS_TOMBSTONE       1427
5934 /*!
5935  * cursor: cursor next calls that skip greater than or equal to 100
5936  * entries
5937  */
5938 #define WT_STAT_CONN_CURSOR_NEXT_SKIP_GE_100        1428
5939 /*! cursor: cursor next calls that skip less than 100 entries */
5940 #define WT_STAT_CONN_CURSOR_NEXT_SKIP_LT_100        1429
5941 /*!
5942  * cursor: cursor prev calls that skip due to a globally visible history
5943  * store tombstone
5944  */
5945 #define WT_STAT_CONN_CURSOR_PREV_HS_TOMBSTONE       1430
5946 /*!
5947  * cursor: cursor prev calls that skip greater than or equal to 100
5948  * entries
5949  */
5950 #define WT_STAT_CONN_CURSOR_PREV_SKIP_GE_100        1431
5951 /*! cursor: cursor prev calls that skip less than 100 entries */
5952 #define WT_STAT_CONN_CURSOR_PREV_SKIP_LT_100        1432
5953 /*! cursor: open cursor count */
5954 #define WT_STAT_CONN_CURSOR_OPEN_COUNT          1433
5955 /*! reconciliation: approximate byte size of timestamps in pages written */
5956 #define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TS       1434
5957 /*!
5958  * reconciliation: approximate byte size of transaction IDs in pages
5959  * written
5960  */
5961 #define WT_STAT_CONN_REC_TIME_WINDOW_BYTES_TXN      1435
5962 /*! reconciliation: fast-path pages deleted */
5963 #define WT_STAT_CONN_REC_PAGE_DELETE_FAST       1436
5964 /*! reconciliation: page reconciliation calls */
5965 #define WT_STAT_CONN_REC_PAGES              1437
5966 /*! reconciliation: page reconciliation calls for eviction */
5967 #define WT_STAT_CONN_REC_PAGES_EVICTION         1438
5968 /*! reconciliation: pages deleted */
5969 #define WT_STAT_CONN_REC_PAGE_DELETE            1439
5970 /*!
5971  * reconciliation: pages written including an aggregated newest start
5972  * durable timestamp
5973  */
5974 #define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_START_DURABLE_TS  1440
5975 /*!
5976  * reconciliation: pages written including an aggregated newest stop
5977  * durable timestamp
5978  */
5979 #define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS   1441
5980 /*!
5981  * reconciliation: pages written including an aggregated newest stop
5982  * timestamp
5983  */
5984 #define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TS   1442
5985 /*!
5986  * reconciliation: pages written including an aggregated newest stop
5987  * transaction ID
5988  */
5989 #define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_STOP_TXN  1443
5990 /*!
5991  * reconciliation: pages written including an aggregated newest
5992  * transaction ID
5993  */
5994 #define WT_STAT_CONN_REC_TIME_AGGR_NEWEST_TXN       1444
5995 /*!
5996  * reconciliation: pages written including an aggregated oldest start
5997  * timestamp
5998  */
5999 #define WT_STAT_CONN_REC_TIME_AGGR_OLDEST_START_TS  1445
6000 /*! reconciliation: pages written including an aggregated prepare */
6001 #define WT_STAT_CONN_REC_TIME_AGGR_PREPARED     1446
6002 /*!
6003  * reconciliation: pages written including at least one start durable
6004  * timestamp
6005  */
6006 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 1447
6007 /*!
6008  * reconciliation: pages written including at least one start transaction
6009  * ID
6010  */
6011 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_START_TXN    1448
6012 /*!
6013  * reconciliation: pages written including at least one stop durable
6014  * timestamp
6015  */
6016 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS  1449
6017 /*! reconciliation: pages written including at least one stop timestamp */
6018 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TS  1450
6019 /*!
6020  * reconciliation: pages written including at least one stop transaction
6021  * ID
6022  */
6023 #define WT_STAT_CONN_REC_TIME_WINDOW_PAGES_STOP_TXN 1451
6024 /*! reconciliation: records written including a start durable timestamp */
6025 #define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_START_TS   1452
6026 /*! reconciliation: records written including a start timestamp */
6027 #define WT_STAT_CONN_REC_TIME_WINDOW_START_TS       1453
6028 /*! reconciliation: records written including a start transaction ID */
6029 #define WT_STAT_CONN_REC_TIME_WINDOW_START_TXN      1454
6030 /*! reconciliation: records written including a stop durable timestamp */
6031 #define WT_STAT_CONN_REC_TIME_WINDOW_DURABLE_STOP_TS    1455
6032 /*! reconciliation: records written including a stop timestamp */
6033 #define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TS        1456
6034 /*! reconciliation: records written including a stop transaction ID */
6035 #define WT_STAT_CONN_REC_TIME_WINDOW_STOP_TXN       1457
6036 /*! session: tiered storage local retention time (secs) */
6037 #define WT_STAT_CONN_TIERED_RETENTION           1458
6038 /*! session: tiered storage object size */
6039 #define WT_STAT_CONN_TIERED_OBJECT_SIZE         1459
6040 /*! transaction: race to read prepared update retry */
6041 #define WT_STAT_CONN_TXN_READ_RACE_PREPARE_UPDATE   1460
6042 /*!
6043  * transaction: rollback to stable history store records with stop
6044  * timestamps older than newer records
6045  */
6046 #define WT_STAT_CONN_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 1461
6047 /*! transaction: rollback to stable inconsistent checkpoint */
6048 #define WT_STAT_CONN_TXN_RTS_INCONSISTENT_CKPT      1462
6049 /*! transaction: rollback to stable keys removed */
6050 #define WT_STAT_CONN_TXN_RTS_KEYS_REMOVED       1463
6051 /*! transaction: rollback to stable keys restored */
6052 #define WT_STAT_CONN_TXN_RTS_KEYS_RESTORED      1464
6053 /*! transaction: rollback to stable restored tombstones from history store */
6054 #define WT_STAT_CONN_TXN_RTS_HS_RESTORE_TOMBSTONES  1465
6055 /*! transaction: rollback to stable restored updates from history store */
6056 #define WT_STAT_CONN_TXN_RTS_HS_RESTORE_UPDATES     1466
6057 /*! transaction: rollback to stable sweeping history store keys */
6058 #define WT_STAT_CONN_TXN_RTS_SWEEP_HS_KEYS      1467
6059 /*! transaction: rollback to stable updates removed from history store */
6060 #define WT_STAT_CONN_TXN_RTS_HS_REMOVED         1468
6061 /*! transaction: transaction checkpoints due to obsolete pages */
6062 #define WT_STAT_CONN_TXN_CHECKPOINT_OBSOLETE_APPLIED    1469
6063 /*! transaction: update conflicts */
6064 #define WT_STAT_CONN_TXN_UPDATE_CONFLICT        1470
6065 
6066 /*!
6067  * @}
6068  * @name Statistics for data sources
6069  * @anchor statistics_dsrc
6070  * @{
6071  */
6072 /*! LSM: bloom filter false positives */
6073 #define WT_STAT_DSRC_BLOOM_FALSE_POSITIVE       2000
6074 /*! LSM: bloom filter hits */
6075 #define WT_STAT_DSRC_BLOOM_HIT              2001
6076 /*! LSM: bloom filter misses */
6077 #define WT_STAT_DSRC_BLOOM_MISS             2002
6078 /*! LSM: bloom filter pages evicted from cache */
6079 #define WT_STAT_DSRC_BLOOM_PAGE_EVICT           2003
6080 /*! LSM: bloom filter pages read into cache */
6081 #define WT_STAT_DSRC_BLOOM_PAGE_READ            2004
6082 /*! LSM: bloom filters in the LSM tree */
6083 #define WT_STAT_DSRC_BLOOM_COUNT            2005
6084 /*! LSM: chunks in the LSM tree */
6085 #define WT_STAT_DSRC_LSM_CHUNK_COUNT            2006
6086 /*! LSM: highest merge generation in the LSM tree */
6087 #define WT_STAT_DSRC_LSM_GENERATION_MAX         2007
6088 /*!
6089  * LSM: queries that could have benefited from a Bloom filter that did
6090  * not exist
6091  */
6092 #define WT_STAT_DSRC_LSM_LOOKUP_NO_BLOOM        2008
6093 /*! LSM: total size of bloom filters */
6094 #define WT_STAT_DSRC_BLOOM_SIZE             2009
6095 /*! block-manager: allocations requiring file extension */
6096 #define WT_STAT_DSRC_BLOCK_EXTENSION            2010
6097 /*! block-manager: blocks allocated */
6098 #define WT_STAT_DSRC_BLOCK_ALLOC            2011
6099 /*! block-manager: blocks freed */
6100 #define WT_STAT_DSRC_BLOCK_FREE             2012
6101 /*! block-manager: checkpoint size */
6102 #define WT_STAT_DSRC_BLOCK_CHECKPOINT_SIZE      2013
6103 /*! block-manager: file allocation unit size */
6104 #define WT_STAT_DSRC_ALLOCATION_SIZE            2014
6105 /*! block-manager: file bytes available for reuse */
6106 #define WT_STAT_DSRC_BLOCK_REUSE_BYTES          2015
6107 /*! block-manager: file magic number */
6108 #define WT_STAT_DSRC_BLOCK_MAGIC            2016
6109 /*! block-manager: file major version number */
6110 #define WT_STAT_DSRC_BLOCK_MAJOR            2017
6111 /*! block-manager: file size in bytes */
6112 #define WT_STAT_DSRC_BLOCK_SIZE             2018
6113 /*! block-manager: minor version number */
6114 #define WT_STAT_DSRC_BLOCK_MINOR            2019
6115 /*! btree: btree checkpoint generation */
6116 #define WT_STAT_DSRC_BTREE_CHECKPOINT_GENERATION    2020
6117 /*! btree: btree clean tree checkpoint expiration time */
6118 #define WT_STAT_DSRC_BTREE_CLEAN_CHECKPOINT_TIMER   2021
6119 /*!
6120  * btree: column-store fixed-size leaf pages, only reported if tree_walk
6121  * or all statistics are enabled
6122  */
6123 #define WT_STAT_DSRC_BTREE_COLUMN_FIX           2022
6124 /*!
6125  * btree: column-store internal pages, only reported if tree_walk or all
6126  * statistics are enabled
6127  */
6128 #define WT_STAT_DSRC_BTREE_COLUMN_INTERNAL      2023
6129 /*!
6130  * btree: column-store variable-size RLE encoded values, only reported if
6131  * tree_walk or all statistics are enabled
6132  */
6133 #define WT_STAT_DSRC_BTREE_COLUMN_RLE           2024
6134 /*!
6135  * btree: column-store variable-size deleted values, only reported if
6136  * tree_walk or all statistics are enabled
6137  */
6138 #define WT_STAT_DSRC_BTREE_COLUMN_DELETED       2025
6139 /*!
6140  * btree: column-store variable-size leaf pages, only reported if
6141  * tree_walk or all statistics are enabled
6142  */
6143 #define WT_STAT_DSRC_BTREE_COLUMN_VARIABLE      2026
6144 /*! btree: fixed-record size */
6145 #define WT_STAT_DSRC_BTREE_FIXED_LEN            2027
6146 /*! btree: maximum internal page key size */
6147 #define WT_STAT_DSRC_BTREE_MAXINTLKEY           2028
6148 /*! btree: maximum internal page size */
6149 #define WT_STAT_DSRC_BTREE_MAXINTLPAGE          2029
6150 /*! btree: maximum leaf page key size */
6151 #define WT_STAT_DSRC_BTREE_MAXLEAFKEY           2030
6152 /*! btree: maximum leaf page size */
6153 #define WT_STAT_DSRC_BTREE_MAXLEAFPAGE          2031
6154 /*! btree: maximum leaf page value size */
6155 #define WT_STAT_DSRC_BTREE_MAXLEAFVALUE         2032
6156 /*! btree: maximum tree depth */
6157 #define WT_STAT_DSRC_BTREE_MAXIMUM_DEPTH        2033
6158 /*!
6159  * btree: number of key/value pairs, only reported if tree_walk or all
6160  * statistics are enabled
6161  */
6162 #define WT_STAT_DSRC_BTREE_ENTRIES          2034
6163 /*!
6164  * btree: overflow pages, only reported if tree_walk or all statistics
6165  * are enabled
6166  */
6167 #define WT_STAT_DSRC_BTREE_OVERFLOW         2035
6168 /*! btree: pages rewritten by compaction */
6169 #define WT_STAT_DSRC_BTREE_COMPACT_REWRITE      2036
6170 /*!
6171  * btree: row-store empty values, only reported if tree_walk or all
6172  * statistics are enabled
6173  */
6174 #define WT_STAT_DSRC_BTREE_ROW_EMPTY_VALUES     2037
6175 /*!
6176  * btree: row-store internal pages, only reported if tree_walk or all
6177  * statistics are enabled
6178  */
6179 #define WT_STAT_DSRC_BTREE_ROW_INTERNAL         2038
6180 /*!
6181  * btree: row-store leaf pages, only reported if tree_walk or all
6182  * statistics are enabled
6183  */
6184 #define WT_STAT_DSRC_BTREE_ROW_LEAF         2039
6185 /*! cache: data source pages selected for eviction unable to be evicted */
6186 #define WT_STAT_DSRC_CACHE_EVICTION_FAIL        2040
6187 /*! cache: eviction walk passes of a file */
6188 #define WT_STAT_DSRC_CACHE_EVICTION_WALK_PASSES     2041
6189 /*!
6190  * cache_walk: Average difference between current eviction generation
6191  * when the page was last considered, only reported if cache_walk or all
6192  * statistics are enabled
6193  */
6194 #define WT_STAT_DSRC_CACHE_STATE_GEN_AVG_GAP        2042
6195 /*!
6196  * cache_walk: Average on-disk page image size seen, only reported if
6197  * cache_walk or all statistics are enabled
6198  */
6199 #define WT_STAT_DSRC_CACHE_STATE_AVG_WRITTEN_SIZE   2043
6200 /*!
6201  * cache_walk: Average time in cache for pages that have been visited by
6202  * the eviction server, only reported if cache_walk or all statistics are
6203  * enabled
6204  */
6205 #define WT_STAT_DSRC_CACHE_STATE_AVG_VISITED_AGE    2044
6206 /*!
6207  * cache_walk: Average time in cache for pages that have not been visited
6208  * by the eviction server, only reported if cache_walk or all statistics
6209  * are enabled
6210  */
6211 #define WT_STAT_DSRC_CACHE_STATE_AVG_UNVISITED_AGE  2045
6212 /*!
6213  * cache_walk: Clean pages currently in cache, only reported if
6214  * cache_walk or all statistics are enabled
6215  */
6216 #define WT_STAT_DSRC_CACHE_STATE_PAGES_CLEAN        2046
6217 /*!
6218  * cache_walk: Current eviction generation, only reported if cache_walk
6219  * or all statistics are enabled
6220  */
6221 #define WT_STAT_DSRC_CACHE_STATE_GEN_CURRENT        2047
6222 /*!
6223  * cache_walk: Dirty pages currently in cache, only reported if
6224  * cache_walk or all statistics are enabled
6225  */
6226 #define WT_STAT_DSRC_CACHE_STATE_PAGES_DIRTY        2048
6227 /*!
6228  * cache_walk: Entries in the root page, only reported if cache_walk or
6229  * all statistics are enabled
6230  */
6231 #define WT_STAT_DSRC_CACHE_STATE_ROOT_ENTRIES       2049
6232 /*!
6233  * cache_walk: Internal pages currently in cache, only reported if
6234  * cache_walk or all statistics are enabled
6235  */
6236 #define WT_STAT_DSRC_CACHE_STATE_PAGES_INTERNAL     2050
6237 /*!
6238  * cache_walk: Leaf pages currently in cache, only reported if cache_walk
6239  * or all statistics are enabled
6240  */
6241 #define WT_STAT_DSRC_CACHE_STATE_PAGES_LEAF     2051
6242 /*!
6243  * cache_walk: Maximum difference between current eviction generation
6244  * when the page was last considered, only reported if cache_walk or all
6245  * statistics are enabled
6246  */
6247 #define WT_STAT_DSRC_CACHE_STATE_GEN_MAX_GAP        2052
6248 /*!
6249  * cache_walk: Maximum page size seen, only reported if cache_walk or all
6250  * statistics are enabled
6251  */
6252 #define WT_STAT_DSRC_CACHE_STATE_MAX_PAGESIZE       2053
6253 /*!
6254  * cache_walk: Minimum on-disk page image size seen, only reported if
6255  * cache_walk or all statistics are enabled
6256  */
6257 #define WT_STAT_DSRC_CACHE_STATE_MIN_WRITTEN_SIZE   2054
6258 /*!
6259  * cache_walk: Number of pages never visited by eviction server, only
6260  * reported if cache_walk or all statistics are enabled
6261  */
6262 #define WT_STAT_DSRC_CACHE_STATE_UNVISITED_COUNT    2055
6263 /*!
6264  * cache_walk: On-disk page image sizes smaller than a single allocation
6265  * unit, only reported if cache_walk or all statistics are enabled
6266  */
6267 #define WT_STAT_DSRC_CACHE_STATE_SMALLER_ALLOC_SIZE 2056
6268 /*!
6269  * cache_walk: Pages created in memory and never written, only reported
6270  * if cache_walk or all statistics are enabled
6271  */
6272 #define WT_STAT_DSRC_CACHE_STATE_MEMORY         2057
6273 /*!
6274  * cache_walk: Pages currently queued for eviction, only reported if
6275  * cache_walk or all statistics are enabled
6276  */
6277 #define WT_STAT_DSRC_CACHE_STATE_QUEUED         2058
6278 /*!
6279  * cache_walk: Pages that could not be queued for eviction, only reported
6280  * if cache_walk or all statistics are enabled
6281  */
6282 #define WT_STAT_DSRC_CACHE_STATE_NOT_QUEUEABLE      2059
6283 /*!
6284  * cache_walk: Refs skipped during cache traversal, only reported if
6285  * cache_walk or all statistics are enabled
6286  */
6287 #define WT_STAT_DSRC_CACHE_STATE_REFS_SKIPPED       2060
6288 /*!
6289  * cache_walk: Size of the root page, only reported if cache_walk or all
6290  * statistics are enabled
6291  */
6292 #define WT_STAT_DSRC_CACHE_STATE_ROOT_SIZE      2061
6293 /*!
6294  * cache_walk: Total number of pages currently in cache, only reported if
6295  * cache_walk or all statistics are enabled
6296  */
6297 #define WT_STAT_DSRC_CACHE_STATE_PAGES          2062
6298 /*!
6299  * compression: compressed page maximum internal page size prior to
6300  * compression
6301  */
6302 #define WT_STAT_DSRC_COMPRESS_PRECOMP_INTL_MAX_PAGE_SIZE    2063
6303 /*!
6304  * compression: compressed page maximum leaf page size prior to
6305  * compression
6306  */
6307 #define WT_STAT_DSRC_COMPRESS_PRECOMP_LEAF_MAX_PAGE_SIZE    2064
6308 /*! compression: compressed pages read */
6309 #define WT_STAT_DSRC_COMPRESS_READ          2065
6310 /*! compression: compressed pages written */
6311 #define WT_STAT_DSRC_COMPRESS_WRITE         2066
6312 /*! compression: page written failed to compress */
6313 #define WT_STAT_DSRC_COMPRESS_WRITE_FAIL        2067
6314 /*! compression: page written was too small to compress */
6315 #define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL       2068
6316 /*! cursor: bulk loaded cursor insert calls */
6317 #define WT_STAT_DSRC_CURSOR_INSERT_BULK         2069
6318 /*! cursor: cache cursors reuse count */
6319 #define WT_STAT_DSRC_CURSOR_REOPEN          2070
6320 /*! cursor: close calls that result in cache */
6321 #define WT_STAT_DSRC_CURSOR_CACHE           2071
6322 /*! cursor: create calls */
6323 #define WT_STAT_DSRC_CURSOR_CREATE          2072
6324 /*! cursor: insert calls */
6325 #define WT_STAT_DSRC_CURSOR_INSERT          2073
6326 /*! cursor: insert key and value bytes */
6327 #define WT_STAT_DSRC_CURSOR_INSERT_BYTES        2074
6328 /*! cursor: modify */
6329 #define WT_STAT_DSRC_CURSOR_MODIFY          2075
6330 /*! cursor: modify key and value bytes affected */
6331 #define WT_STAT_DSRC_CURSOR_MODIFY_BYTES        2076
6332 /*! cursor: modify value bytes modified */
6333 #define WT_STAT_DSRC_CURSOR_MODIFY_BYTES_TOUCH      2077
6334 /*! cursor: next calls */
6335 #define WT_STAT_DSRC_CURSOR_NEXT            2078
6336 /*! cursor: operation restarted */
6337 #define WT_STAT_DSRC_CURSOR_RESTART         2079
6338 /*! cursor: prev calls */
6339 #define WT_STAT_DSRC_CURSOR_PREV            2080
6340 /*! cursor: remove calls */
6341 #define WT_STAT_DSRC_CURSOR_REMOVE          2081
6342 /*! cursor: remove key bytes removed */
6343 #define WT_STAT_DSRC_CURSOR_REMOVE_BYTES        2082
6344 /*! cursor: reserve calls */
6345 #define WT_STAT_DSRC_CURSOR_RESERVE         2083
6346 /*! cursor: reset calls */
6347 #define WT_STAT_DSRC_CURSOR_RESET           2084
6348 /*! cursor: search calls */
6349 #define WT_STAT_DSRC_CURSOR_SEARCH          2085
6350 /*! cursor: search history store calls */
6351 #define WT_STAT_DSRC_CURSOR_SEARCH_HS           2086
6352 /*! cursor: search near calls */
6353 #define WT_STAT_DSRC_CURSOR_SEARCH_NEAR         2087
6354 /*! cursor: truncate calls */
6355 #define WT_STAT_DSRC_CURSOR_TRUNCATE            2088
6356 /*! cursor: update calls */
6357 #define WT_STAT_DSRC_CURSOR_UPDATE          2089
6358 /*! cursor: update key and value bytes */
6359 #define WT_STAT_DSRC_CURSOR_UPDATE_BYTES        2090
6360 /*! cursor: update value size change */
6361 #define WT_STAT_DSRC_CURSOR_UPDATE_BYTES_CHANGED    2091
6362 /*! reconciliation: dictionary matches */
6363 #define WT_STAT_DSRC_REC_DICTIONARY         2092
6364 /*!
6365  * reconciliation: internal page key bytes discarded using suffix
6366  * compression
6367  */
6368 #define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION     2093
6369 /*! reconciliation: internal page multi-block writes */
6370 #define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL        2094
6371 /*! reconciliation: internal-page overflow keys */
6372 #define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL      2095
6373 /*! reconciliation: leaf page key bytes discarded using prefix compression */
6374 #define WT_STAT_DSRC_REC_PREFIX_COMPRESSION     2096
6375 /*! reconciliation: leaf page multi-block writes */
6376 #define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF        2097
6377 /*! reconciliation: leaf-page overflow keys */
6378 #define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF      2098
6379 /*! reconciliation: maximum blocks required for a page */
6380 #define WT_STAT_DSRC_REC_MULTIBLOCK_MAX         2099
6381 /*! reconciliation: overflow values written */
6382 #define WT_STAT_DSRC_REC_OVERFLOW_VALUE         2100
6383 /*! reconciliation: page checksum matches */
6384 #define WT_STAT_DSRC_REC_PAGE_MATCH         2101
6385 /*! reconciliation: pages written including at least one prepare */
6386 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_PREPARED 2102
6387 /*! reconciliation: pages written including at least one start timestamp */
6388 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TS 2103
6389 /*! reconciliation: records written including a prepare */
6390 #define WT_STAT_DSRC_REC_TIME_WINDOW_PREPARED       2104
6391 /*! session: object compaction */
6392 #define WT_STAT_DSRC_SESSION_COMPACT            2105
6393 /*! LSM: sleep for LSM checkpoint throttle */
6394 #define WT_STAT_DSRC_LSM_CHECKPOINT_THROTTLE        2106
6395 /*! LSM: sleep for LSM merge throttle */
6396 #define WT_STAT_DSRC_LSM_MERGE_THROTTLE         2107
6397 /*! cache: bytes currently in the cache */
6398 #define WT_STAT_DSRC_CACHE_BYTES_INUSE          2108
6399 /*! cache: bytes dirty in the cache cumulative */
6400 #define WT_STAT_DSRC_CACHE_BYTES_DIRTY_TOTAL        2109
6401 /*! cache: bytes read into cache */
6402 #define WT_STAT_DSRC_CACHE_BYTES_READ           2110
6403 /*! cache: bytes written from cache */
6404 #define WT_STAT_DSRC_CACHE_BYTES_WRITE          2111
6405 /*! cache: checkpoint blocked page eviction */
6406 #define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT      2112
6407 /*! cache: eviction walk target pages histogram - 0-9 */
6408 #define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT10    2113
6409 /*! cache: eviction walk target pages histogram - 10-31 */
6410 #define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT32    2114
6411 /*! cache: eviction walk target pages histogram - 128 and higher */
6412 #define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_GE128   2115
6413 /*! cache: eviction walk target pages histogram - 32-63 */
6414 #define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT64    2116
6415 /*! cache: eviction walk target pages histogram - 64-128 */
6416 #define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT128   2117
6417 /*!
6418  * cache: eviction walk target pages reduced due to history store cache
6419  * pressure
6420  */
6421 #define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_REDUCED 2118
6422 /*! cache: eviction walks abandoned */
6423 #define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ABANDONED 2119
6424 /*! cache: eviction walks gave up because they restarted their walk twice */
6425 #define WT_STAT_DSRC_CACHE_EVICTION_WALKS_STOPPED   2120
6426 /*!
6427  * cache: eviction walks gave up because they saw too many pages and
6428  * found no candidates
6429  */
6430 #define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS    2121
6431 /*!
6432  * cache: eviction walks gave up because they saw too many pages and
6433  * found too few candidates
6434  */
6435 #define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 2122
6436 /*! cache: eviction walks reached end of tree */
6437 #define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ENDED     2123
6438 /*! cache: eviction walks restarted */
6439 #define WT_STAT_DSRC_CACHE_EVICTION_WALK_RESTART    2124
6440 /*! cache: eviction walks started from root of tree */
6441 #define WT_STAT_DSRC_CACHE_EVICTION_WALK_FROM_ROOT  2125
6442 /*! cache: eviction walks started from saved location in tree */
6443 #define WT_STAT_DSRC_CACHE_EVICTION_WALK_SAVED_POS  2126
6444 /*! cache: hazard pointer blocked page eviction */
6445 #define WT_STAT_DSRC_CACHE_EVICTION_HAZARD      2127
6446 /*! cache: history store table insert calls */
6447 #define WT_STAT_DSRC_CACHE_HS_INSERT            2128
6448 /*! cache: history store table insert calls that returned restart */
6449 #define WT_STAT_DSRC_CACHE_HS_INSERT_RESTART        2129
6450 /*!
6451  * cache: history store table out-of-order resolved updates that lose
6452  * their durable timestamp
6453  */
6454 #define WT_STAT_DSRC_CACHE_HS_ORDER_LOSE_DURABLE_TIMESTAMP  2130
6455 /*!
6456  * cache: history store table out-of-order updates that were fixed up by
6457  * moving existing records
6458  */
6459 #define WT_STAT_DSRC_CACHE_HS_ORDER_FIXUP_MOVE      2131
6460 /*!
6461  * cache: history store table out-of-order updates that were fixed up
6462  * during insertion
6463  */
6464 #define WT_STAT_DSRC_CACHE_HS_ORDER_FIXUP_INSERT    2132
6465 /*! cache: history store table reads */
6466 #define WT_STAT_DSRC_CACHE_HS_READ          2133
6467 /*! cache: history store table reads missed */
6468 #define WT_STAT_DSRC_CACHE_HS_READ_MISS         2134
6469 /*! cache: history store table reads requiring squashed modifies */
6470 #define WT_STAT_DSRC_CACHE_HS_READ_SQUASH       2135
6471 /*!
6472  * cache: history store table truncation by rollback to stable to remove
6473  * an unstable update
6474  */
6475 #define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_RTS_UNSTABLE 2136
6476 /*!
6477  * cache: history store table truncation by rollback to stable to remove
6478  * an update
6479  */
6480 #define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_RTS      2137
6481 /*! cache: history store table truncation to remove an update */
6482 #define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE      2138
6483 /*!
6484  * cache: history store table truncation to remove range of updates due
6485  * to key being removed from the data page during reconciliation
6486  */
6487 #define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_ONPAGE_REMOVAL   2139
6488 /*!
6489  * cache: history store table truncation to remove range of updates due
6490  * to non timestamped update on data page
6491  */
6492 #define WT_STAT_DSRC_CACHE_HS_KEY_TRUNCATE_NON_TS   2140
6493 /*! cache: history store table writes requiring squashed modifies */
6494 #define WT_STAT_DSRC_CACHE_HS_WRITE_SQUASH      2141
6495 /*! cache: in-memory page passed criteria to be split */
6496 #define WT_STAT_DSRC_CACHE_INMEM_SPLITTABLE     2142
6497 /*! cache: in-memory page splits */
6498 #define WT_STAT_DSRC_CACHE_INMEM_SPLIT          2143
6499 /*! cache: internal pages evicted */
6500 #define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL        2144
6501 /*! cache: internal pages split during eviction */
6502 #define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_INTERNAL  2145
6503 /*! cache: leaf pages split during eviction */
6504 #define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_LEAF      2146
6505 /*! cache: modified pages evicted */
6506 #define WT_STAT_DSRC_CACHE_EVICTION_DIRTY       2147
6507 /*! cache: overflow pages read into cache */
6508 #define WT_STAT_DSRC_CACHE_READ_OVERFLOW        2148
6509 /*! cache: page split during eviction deepened the tree */
6510 #define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN      2149
6511 /*! cache: page written requiring history store records */
6512 #define WT_STAT_DSRC_CACHE_WRITE_HS         2150
6513 /*! cache: pages read into cache */
6514 #define WT_STAT_DSRC_CACHE_READ             2151
6515 /*! cache: pages read into cache after truncate */
6516 #define WT_STAT_DSRC_CACHE_READ_DELETED         2152
6517 /*! cache: pages read into cache after truncate in prepare state */
6518 #define WT_STAT_DSRC_CACHE_READ_DELETED_PREPARED    2153
6519 /*! cache: pages requested from the cache */
6520 #define WT_STAT_DSRC_CACHE_PAGES_REQUESTED      2154
6521 /*! cache: pages seen by eviction walk */
6522 #define WT_STAT_DSRC_CACHE_EVICTION_PAGES_SEEN      2155
6523 /*! cache: pages written from cache */
6524 #define WT_STAT_DSRC_CACHE_WRITE            2156
6525 /*! cache: pages written requiring in-memory restoration */
6526 #define WT_STAT_DSRC_CACHE_WRITE_RESTORE        2157
6527 /*! cache: tracked dirty bytes in the cache */
6528 #define WT_STAT_DSRC_CACHE_BYTES_DIRTY          2158
6529 /*! cache: unmodified pages evicted */
6530 #define WT_STAT_DSRC_CACHE_EVICTION_CLEAN       2159
6531 /*! checkpoint-cleanup: pages added for eviction */
6532 #define WT_STAT_DSRC_CC_PAGES_EVICT         2160
6533 /*! checkpoint-cleanup: pages removed */
6534 #define WT_STAT_DSRC_CC_PAGES_REMOVED           2161
6535 /*! checkpoint-cleanup: pages skipped during tree walk */
6536 #define WT_STAT_DSRC_CC_PAGES_WALK_SKIPPED      2162
6537 /*! checkpoint-cleanup: pages visited */
6538 #define WT_STAT_DSRC_CC_PAGES_VISITED           2163
6539 /*! cursor: Total number of entries skipped by cursor next calls */
6540 #define WT_STAT_DSRC_CURSOR_NEXT_SKIP_TOTAL     2164
6541 /*! cursor: Total number of entries skipped by cursor prev calls */
6542 #define WT_STAT_DSRC_CURSOR_PREV_SKIP_TOTAL     2165
6543 /*!
6544  * cursor: Total number of entries skipped to position the history store
6545  * cursor
6546  */
6547 #define WT_STAT_DSRC_CURSOR_SKIP_HS_CUR_POSITION    2166
6548 /*!
6549  * cursor: cursor next calls that skip due to a globally visible history
6550  * store tombstone
6551  */
6552 #define WT_STAT_DSRC_CURSOR_NEXT_HS_TOMBSTONE       2167
6553 /*!
6554  * cursor: cursor next calls that skip greater than or equal to 100
6555  * entries
6556  */
6557 #define WT_STAT_DSRC_CURSOR_NEXT_SKIP_GE_100        2168
6558 /*! cursor: cursor next calls that skip less than 100 entries */
6559 #define WT_STAT_DSRC_CURSOR_NEXT_SKIP_LT_100        2169
6560 /*!
6561  * cursor: cursor prev calls that skip due to a globally visible history
6562  * store tombstone
6563  */
6564 #define WT_STAT_DSRC_CURSOR_PREV_HS_TOMBSTONE       2170
6565 /*!
6566  * cursor: cursor prev calls that skip greater than or equal to 100
6567  * entries
6568  */
6569 #define WT_STAT_DSRC_CURSOR_PREV_SKIP_GE_100        2171
6570 /*! cursor: cursor prev calls that skip less than 100 entries */
6571 #define WT_STAT_DSRC_CURSOR_PREV_SKIP_LT_100        2172
6572 /*! cursor: open cursor count */
6573 #define WT_STAT_DSRC_CURSOR_OPEN_COUNT          2173
6574 /*! reconciliation: approximate byte size of timestamps in pages written */
6575 #define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TS       2174
6576 /*!
6577  * reconciliation: approximate byte size of transaction IDs in pages
6578  * written
6579  */
6580 #define WT_STAT_DSRC_REC_TIME_WINDOW_BYTES_TXN      2175
6581 /*! reconciliation: fast-path pages deleted */
6582 #define WT_STAT_DSRC_REC_PAGE_DELETE_FAST       2176
6583 /*! reconciliation: page reconciliation calls */
6584 #define WT_STAT_DSRC_REC_PAGES              2177
6585 /*! reconciliation: page reconciliation calls for eviction */
6586 #define WT_STAT_DSRC_REC_PAGES_EVICTION         2178
6587 /*! reconciliation: pages deleted */
6588 #define WT_STAT_DSRC_REC_PAGE_DELETE            2179
6589 /*!
6590  * reconciliation: pages written including an aggregated newest start
6591  * durable timestamp
6592  */
6593 #define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_START_DURABLE_TS  2180
6594 /*!
6595  * reconciliation: pages written including an aggregated newest stop
6596  * durable timestamp
6597  */
6598 #define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_DURABLE_TS   2181
6599 /*!
6600  * reconciliation: pages written including an aggregated newest stop
6601  * timestamp
6602  */
6603 #define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TS   2182
6604 /*!
6605  * reconciliation: pages written including an aggregated newest stop
6606  * transaction ID
6607  */
6608 #define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_STOP_TXN  2183
6609 /*!
6610  * reconciliation: pages written including an aggregated newest
6611  * transaction ID
6612  */
6613 #define WT_STAT_DSRC_REC_TIME_AGGR_NEWEST_TXN       2184
6614 /*!
6615  * reconciliation: pages written including an aggregated oldest start
6616  * timestamp
6617  */
6618 #define WT_STAT_DSRC_REC_TIME_AGGR_OLDEST_START_TS  2185
6619 /*! reconciliation: pages written including an aggregated prepare */
6620 #define WT_STAT_DSRC_REC_TIME_AGGR_PREPARED     2186
6621 /*!
6622  * reconciliation: pages written including at least one start durable
6623  * timestamp
6624  */
6625 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_START_TS 2187
6626 /*!
6627  * reconciliation: pages written including at least one start transaction
6628  * ID
6629  */
6630 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_START_TXN    2188
6631 /*!
6632  * reconciliation: pages written including at least one stop durable
6633  * timestamp
6634  */
6635 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_DURABLE_STOP_TS  2189
6636 /*! reconciliation: pages written including at least one stop timestamp */
6637 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TS  2190
6638 /*!
6639  * reconciliation: pages written including at least one stop transaction
6640  * ID
6641  */
6642 #define WT_STAT_DSRC_REC_TIME_WINDOW_PAGES_STOP_TXN 2191
6643 /*! reconciliation: records written including a start durable timestamp */
6644 #define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_START_TS   2192
6645 /*! reconciliation: records written including a start timestamp */
6646 #define WT_STAT_DSRC_REC_TIME_WINDOW_START_TS       2193
6647 /*! reconciliation: records written including a start transaction ID */
6648 #define WT_STAT_DSRC_REC_TIME_WINDOW_START_TXN      2194
6649 /*! reconciliation: records written including a stop durable timestamp */
6650 #define WT_STAT_DSRC_REC_TIME_WINDOW_DURABLE_STOP_TS    2195
6651 /*! reconciliation: records written including a stop timestamp */
6652 #define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TS        2196
6653 /*! reconciliation: records written including a stop transaction ID */
6654 #define WT_STAT_DSRC_REC_TIME_WINDOW_STOP_TXN       2197
6655 /*! session: tiered storage local retention time (secs) */
6656 #define WT_STAT_DSRC_TIERED_RETENTION           2198
6657 /*! session: tiered storage object size */
6658 #define WT_STAT_DSRC_TIERED_OBJECT_SIZE         2199
6659 /*! transaction: race to read prepared update retry */
6660 #define WT_STAT_DSRC_TXN_READ_RACE_PREPARE_UPDATE   2200
6661 /*!
6662  * transaction: rollback to stable history store records with stop
6663  * timestamps older than newer records
6664  */
6665 #define WT_STAT_DSRC_TXN_RTS_HS_STOP_OLDER_THAN_NEWER_START 2201
6666 /*! transaction: rollback to stable inconsistent checkpoint */
6667 #define WT_STAT_DSRC_TXN_RTS_INCONSISTENT_CKPT      2202
6668 /*! transaction: rollback to stable keys removed */
6669 #define WT_STAT_DSRC_TXN_RTS_KEYS_REMOVED       2203
6670 /*! transaction: rollback to stable keys restored */
6671 #define WT_STAT_DSRC_TXN_RTS_KEYS_RESTORED      2204
6672 /*! transaction: rollback to stable restored tombstones from history store */
6673 #define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_TOMBSTONES  2205
6674 /*! transaction: rollback to stable restored updates from history store */
6675 #define WT_STAT_DSRC_TXN_RTS_HS_RESTORE_UPDATES     2206
6676 /*! transaction: rollback to stable sweeping history store keys */
6677 #define WT_STAT_DSRC_TXN_RTS_SWEEP_HS_KEYS      2207
6678 /*! transaction: rollback to stable updates removed from history store */
6679 #define WT_STAT_DSRC_TXN_RTS_HS_REMOVED         2208
6680 /*! transaction: transaction checkpoints due to obsolete pages */
6681 #define WT_STAT_DSRC_TXN_CHECKPOINT_OBSOLETE_APPLIED    2209
6682 /*! transaction: update conflicts */
6683 #define WT_STAT_DSRC_TXN_UPDATE_CONFLICT        2210
6684 
6685 /*!
6686  * @}
6687  * @name Statistics for join cursors
6688  * @anchor statistics_join
6689  * @{
6690  */
6691 /*! : accesses to the main table */
6692 #define WT_STAT_JOIN_MAIN_ACCESS            3000
6693 /*! : bloom filter false positives */
6694 #define WT_STAT_JOIN_BLOOM_FALSE_POSITIVE       3001
6695 /*! : checks that conditions of membership are satisfied */
6696 #define WT_STAT_JOIN_MEMBERSHIP_CHECK           3002
6697 /*! : items inserted into a bloom filter */
6698 #define WT_STAT_JOIN_BLOOM_INSERT           3003
6699 /*! : items iterated */
6700 #define WT_STAT_JOIN_ITERATED               3004
6701 
6702 /*!
6703  * @}
6704  * @name Statistics for session
6705  * @anchor statistics_session
6706  * @{
6707  */
6708 /*! session: bytes read into cache */
6709 #define WT_STAT_SESSION_BYTES_READ          4000
6710 /*! session: bytes written from cache */
6711 #define WT_STAT_SESSION_BYTES_WRITE         4001
6712 /*! session: dhandle lock wait time (usecs) */
6713 #define WT_STAT_SESSION_LOCK_DHANDLE_WAIT       4002
6714 /*! session: page read from disk to cache time (usecs) */
6715 #define WT_STAT_SESSION_READ_TIME           4003
6716 /*! session: page write from cache to disk time (usecs) */
6717 #define WT_STAT_SESSION_WRITE_TIME          4004
6718 /*! session: schema lock wait time (usecs) */
6719 #define WT_STAT_SESSION_LOCK_SCHEMA_WAIT        4005
6720 /*! session: time waiting for cache (usecs) */
6721 #define WT_STAT_SESSION_CACHE_TIME          4006
6722 /*! @} */
6723 /*
6724  * Statistics section: END
6725  * DO NOT EDIT: automatically built by dist/stat.py.
6726  */
6727 /*! @} */
6728 
6729 #undef __F
6730 
6731 #if defined(__cplusplus)
6732 }
6733 #endif
6734 #endif /* __WIREDTIGER_H_ */