summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsueloverso <sue@mongodb.com>2016-11-30 14:06:39 -0500
committerGitHub <noreply@github.com>2016-11-30 14:06:39 -0500
commit13215e81fc45a12b0ec391b7f9f691180f125af6 (patch)
tree672db8d4247ad2a74f49d7a91bd83d184b11c65a
parent6338c682ec6e10b37954699fdc9341a88dd118fc (diff)
downloadmongo-13215e81fc45a12b0ec391b7f9f691180f125af6.tar.gz
WT-3037 Clean up some log slot comments. (#3163)
-rw-r--r--src/log/log_slot.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/log/log_slot.c b/src/log/log_slot.c
index c79805f5371..a5921df5a74 100644
--- a/src/log/log_slot.c
+++ b/src/log/log_slot.c
@@ -360,8 +360,7 @@ __wt_log_slot_destroy(WT_SESSION_IMPL *session)
/*
* __wt_log_slot_join --
- * Join a consolidated logging slot. Must be called with
- * the read lock held.
+ * Join a consolidated logging slot.
*/
void
__wt_log_slot_join(WT_SESSION_IMPL *session, uint64_t mysize,
@@ -379,11 +378,6 @@ __wt_log_slot_join(WT_SESSION_IMPL *session, uint64_t mysize,
conn = S2C(session);
log = conn->log;
- /*
- * Make sure the length cannot overflow. The caller should not
- * even call this function if it doesn't fit but use direct
- * writes.
- */
WT_ASSERT(session, !F_ISSET(session, WT_SESSION_LOCKED_SLOT));
/*
@@ -469,6 +463,11 @@ __wt_log_slot_release(WT_SESSION_IMPL *session, WT_MYSLOT *myslot, int64_t size)
WT_UNUSED(session);
slot = myslot->slot;
my_start = slot->slot_start_offset + myslot->offset;
+ /*
+ * We maintain the last starting offset within this slot.
+ * This is used to know the offset of the last record that
+ * was written rather than the beginning record of the slot.
+ */
while ((cur_offset = slot->slot_last_offset) < my_start) {
/*
* Set our offset if we are larger.