summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/api.h
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-04-22 10:45:21 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-22 01:01:19 +0000
commitc8279c67d309858027cdb4d079ef9fd7122b1690 (patch)
treec8b4b404a399e87e3d1743d60c243c882b96fede /src/third_party/wiredtiger/src/include/api.h
parentb38c6815cee932098722b72430b3237da3fe312a (diff)
downloadmongo-c8279c67d309858027cdb4d079ef9fd7122b1690.tar.gz
Import wiredtiger: 7b994a862e899a12eb7c3ac814c9fada7d8d1ab9 from branch mongodb-4.4r4.4.0-rc2
ref: 9bd1ece797..7b994a862e for: 4.4.0-rc2 WT-4701 Switch test/format to use WiredTiger locking primitives WT-5766 Separate out internal and shared transaction data WT-5791 Prepare checkpoint can finish in 0msec and reset prepare min stat WT-5794 Remove skew_newest option from reconciliation WT-5833 Fix caching issue for overflow key/value items WT-5919 Disallow logging archival testing with log-based incremental backup WT-5946 Eviction server handles can deadlock when opening HS cursors WT-5968 Make the WT_SESSION_IMPL.txn field an allocated structure WT-5986 Create script for emulating multiversion tests WT-6016 Fill source code comments where lines start with parentheticals WT-6020 __rec_append_orig_value() cleanup WT-6026 Fix s_all breakage on format.h
Diffstat (limited to 'src/third_party/wiredtiger/src/include/api.h')
-rw-r--r--src/third_party/wiredtiger/src/include/api.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/third_party/wiredtiger/src/include/api.h b/src/third_party/wiredtiger/src/include/api.h
index 81118e421d2..e4455d62b03 100644
--- a/src/third_party/wiredtiger/src/include/api.h
+++ b/src/third_party/wiredtiger/src/include/api.h
@@ -86,39 +86,39 @@
while (0)
/* An API call wrapped in a transaction if necessary. */
-#define TXN_API_CALL(s, h, n, bt, config, cfg) \
- do { \
- bool __autotxn = false, __update = false; \
- API_CALL(s, h, n, bt, config, cfg); \
- __wt_txn_timestamp_flags(s); \
- __autotxn = !F_ISSET(&(s)->txn, WT_TXN_AUTOCOMMIT | WT_TXN_RUNNING); \
- if (__autotxn) \
- F_SET(&(s)->txn, WT_TXN_AUTOCOMMIT); \
- __update = !F_ISSET(&(s)->txn, WT_TXN_UPDATE); \
- if (__update) \
- F_SET(&(s)->txn, WT_TXN_UPDATE);
+#define TXN_API_CALL(s, h, n, bt, config, cfg) \
+ do { \
+ bool __autotxn = false, __update = false; \
+ API_CALL(s, h, n, bt, config, cfg); \
+ __wt_txn_timestamp_flags(s); \
+ __autotxn = !F_ISSET((s)->txn, WT_TXN_AUTOCOMMIT | WT_TXN_RUNNING); \
+ if (__autotxn) \
+ F_SET((s)->txn, WT_TXN_AUTOCOMMIT); \
+ __update = !F_ISSET((s)->txn, WT_TXN_UPDATE); \
+ if (__update) \
+ F_SET((s)->txn, WT_TXN_UPDATE);
/* An API call wrapped in a transaction if necessary. */
-#define TXN_API_CALL_NOCONF(s, h, n, dh) \
- do { \
- bool __autotxn = false, __update = false; \
- API_CALL_NOCONF(s, h, n, dh); \
- __wt_txn_timestamp_flags(s); \
- __autotxn = !F_ISSET(&(s)->txn, WT_TXN_AUTOCOMMIT | WT_TXN_RUNNING); \
- if (__autotxn) \
- F_SET(&(s)->txn, WT_TXN_AUTOCOMMIT); \
- __update = !F_ISSET(&(s)->txn, WT_TXN_UPDATE); \
- if (__update) \
- F_SET(&(s)->txn, WT_TXN_UPDATE);
+#define TXN_API_CALL_NOCONF(s, h, n, dh) \
+ do { \
+ bool __autotxn = false, __update = false; \
+ API_CALL_NOCONF(s, h, n, dh); \
+ __wt_txn_timestamp_flags(s); \
+ __autotxn = !F_ISSET((s)->txn, WT_TXN_AUTOCOMMIT | WT_TXN_RUNNING); \
+ if (__autotxn) \
+ F_SET((s)->txn, WT_TXN_AUTOCOMMIT); \
+ __update = !F_ISSET((s)->txn, WT_TXN_UPDATE); \
+ if (__update) \
+ F_SET((s)->txn, WT_TXN_UPDATE);
/* End a transactional API call, optional retry on deadlock. */
#define TXN_API_END_RETRY(s, ret, retry) \
API_END(s, ret); \
if (__update) \
- F_CLR(&(s)->txn, WT_TXN_UPDATE); \
+ F_CLR((s)->txn, WT_TXN_UPDATE); \
if (__autotxn) { \
- if (F_ISSET(&(s)->txn, WT_TXN_AUTOCOMMIT)) \
- F_CLR(&(s)->txn, WT_TXN_AUTOCOMMIT); \
+ if (F_ISSET((s)->txn, WT_TXN_AUTOCOMMIT)) \
+ F_CLR((s)->txn, WT_TXN_AUTOCOMMIT); \
else if ((ret) == 0) \
(ret) = __wt_txn_commit((s), NULL); \
else { \