diff options
author | sueloverso <sue@mongodb.com> | 2016-11-30 14:06:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-30 14:06:39 -0500 |
commit | 13215e81fc45a12b0ec391b7f9f691180f125af6 (patch) | |
tree | 672db8d4247ad2a74f49d7a91bd83d184b11c65a /src | |
parent | 6338c682ec6e10b37954699fdc9341a88dd118fc (diff) | |
download | mongo-13215e81fc45a12b0ec391b7f9f691180f125af6.tar.gz |
WT-3037 Clean up some log slot comments. (#3163)
Diffstat (limited to 'src')
-rw-r--r-- | src/log/log_slot.c | 13 |
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. |