summaryrefslogtreecommitdiff
path: root/src/include/session.h
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@wiredtiger.com>2014-07-02 04:13:30 +0000
committerAlex Gorrod <alexander.gorrod@wiredtiger.com>2014-07-02 04:13:30 +0000
commitb7fdc64cea4a7ece256dc8fdd6b0290b83fcf51b (patch)
treeeb8e068f9f1420ec3f20ff495b7bb51ae08a9af1 /src/include/session.h
parent6de4d06622c9d3001c07b9ded871e2dd1ad85f9c (diff)
parent3db3f781f4acc964626d6377621dbfb8330a7208 (diff)
downloadmongo-b7fdc64cea4a7ece256dc8fdd6b0290b83fcf51b.tar.gz
Merge branch 'develop' into eviction-under-load
Diffstat (limited to 'src/include/session.h')
-rw-r--r--src/include/session.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/include/session.h b/src/include/session.h
index 843ac7a3ccd..65a88f76f91 100644
--- a/src/include/session.h
+++ b/src/include/session.h
@@ -112,30 +112,32 @@ struct __wt_session_impl {
* on our behalf */
/*
- * The free-on-transactional generation" memory and hazard information
- * persist past session close, because they are accessed by threads of
- * control other than the thread owning the session. They live at the
- * end of the structure so it's somewhat easier to clear everything but
- * the fields that persist.
+ * The split stash memory and hazard information persist past session
+ * close, because they are accessed by threads of control other than
+ * the thread owning the session. They live at the end of the
+ * structure so it's somewhat easier to clear everything but the fields
+ * that persist.
*/
#define WT_SESSION_CLEAR_SIZE(s) \
(WT_PTRDIFF(&(s)->flags, s) + sizeof((s)->flags))
uint32_t flags;
/*
- * Sessions can "free" memory that may still be in use, and we use a
- * transactional generation to track it, that is, the session stores
- * a reference to the memory and a current transaction ID; when the
- * oldest transaction ID has moved beyond that point, the memory can
- * be discarded for real.
+ * Splits can "free" memory that may still be in use, and we use a
+ * split generation number to track it, that is, the session stores a
+ * reference to the memory and allocates a split generation; when no
+ * session is reading from that split generation, the memory can be
+ * freed for real.
*/
- struct __wt_fotxn {
- uint64_t txnid; /* Transaction ID */
- void *p; /* Memory, length */
+ struct __wt_split_stash {
+ uint64_t split_gen; /* Split generation */
+ void *p; /* Memory, length */
size_t len;
- } *fotxn; /* Free-on-transaction array */
- size_t fotxn_cnt; /* Array entries */
- size_t fotxn_size; /* Array size */
+ } *split_stash; /* Split stash array */
+ size_t split_stash_cnt; /* Array entries */
+ size_t split_stash_alloc; /* Allocated bytes */
+
+ uint64_t split_gen; /* Reading split generation */
/*
* Hazard pointers.