summaryrefslogtreecommitdiff
path: root/src/include/api.h
diff options
context:
space:
mode:
authorMichael Cahill <mjc@wiredtiger.com>2014-10-20 12:01:55 +1100
committerMichael Cahill <mjc@wiredtiger.com>2014-10-20 12:01:55 +1100
commit6f50592e2b0fffb37277b47603251d110e43c99e (patch)
treeb88658395e34946b1cd043a91e19ba95d8e2fe92 /src/include/api.h
parentc35239c141039c2712f50b762bdf8ddc5d80d08c (diff)
parent5d55a2812130f2fbfb7046f3b376948959ce843e (diff)
downloadmongo-6f50592e2b0fffb37277b47603251d110e43c99e.tar.gz
Merge pull request #1291 from wiredtiger/snap-min
Improvements for long-running transactions
Diffstat (limited to 'src/include/api.h')
-rw-r--r--src/include/api.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/api.h b/src/include/api.h
index d6e923e3560..3acb39acb19 100644
--- a/src/include/api.h
+++ b/src/include/api.h
@@ -11,7 +11,8 @@
const char *__oldname = (s)->name; \
(s)->cursor = (cur); \
(s)->dhandle = (dh); \
- (s)->name = #h "." #n;
+ (s)->name = #h "." #n; \
+ ++(s)->api_level
#define API_CALL_NOCONF(s, h, n, cur, dh) do { \
API_SESSION_INIT(s, h, n, cur, dh); \
@@ -31,7 +32,8 @@
#define API_END(s, ret) \
if ((s) != NULL) { \
(s)->dhandle = __olddh; \
- (s)->name = __oldname; \
+ if (--(s)->api_level > 0) \
+ (s)->name = __oldname; \
if (F_ISSET(&(s)->txn, TXN_RUNNING) && \
(ret) != 0 && \
(ret) != WT_NOTFOUND && \