diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2015-12-31 09:06:36 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2015-12-31 09:06:36 +1100 |
commit | 5cc97129f7d1424df53c4c8a0546f0b2d2ab95fb (patch) | |
tree | 92f2ae82b345f6a6655f2a841ef90ab6e4e478ca /src/cache/cache_las.c | |
parent | 0fefb81438552fc77d5eff0fbb1a097893397091 (diff) | |
download | mongo-5cc97129f7d1424df53c4c8a0546f0b2d2ab95fb.tar.gz |
Nits in metadata cleanup. Add a comment and an assertion.
Diffstat (limited to 'src/cache/cache_las.c')
-rw-r--r-- | src/cache/cache_las.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cache/cache_las.c b/src/cache/cache_las.c index 8d52b45df4f..3f2b4bea751 100644 --- a/src/cache/cache_las.c +++ b/src/cache/cache_las.c @@ -156,6 +156,13 @@ __wt_las_cursor_open(WT_SESSION_IMPL *session, WT_CURSOR **cursorp) WT_RET(ret); /* + * Retrieve the btree from the cursor, rather than the session because + * we don't always switch the LAS handle in to the session before + * entering this function. + */ + btree = ((WT_CURSOR_BTREE *)(*cursorp))->btree; + + /* * Set special flags for the lookaside table: the lookaside flag (used, * for example, to avoid writing records during reconciliation), also * turn off checkpoints and logging. @@ -164,7 +171,6 @@ __wt_las_cursor_open(WT_SESSION_IMPL *session, WT_CURSOR **cursorp) * opens (the first update is safe because it's single-threaded from * wiredtiger_open). */ - btree = ((WT_CURSOR_BTREE *)(*cursorp))->btree; if (!F_ISSET(btree, WT_BTREE_LOOKASIDE)) F_SET(btree, WT_BTREE_LOOKASIDE); if (!F_ISSET(btree, WT_BTREE_NO_CHECKPOINT)) |