diff options
author | sueloverso <sue@mongodb.com> | 2016-06-02 16:30:39 -0400 |
---|---|---|
committer | Keith Bostic <keith.bostic@mongodb.com> | 2016-06-02 16:30:39 -0400 |
commit | a27db763dc3d694bf57ec9755fc1b4f0d06a10ab (patch) | |
tree | 6d9043ef335c2525fe740ee65afa63b0de15f4f7 /src/cache | |
parent | ced588aecd604ab56670b8cdf66b8105e58f4fe3 (diff) | |
download | mongo-a27db763dc3d694bf57ec9755fc1b4f0d06a10ab.tar.gz |
WT-2589 Clear the cursor statistics for LAS when 'clear' is set. (#2772)
Diffstat (limited to 'src/cache')
-rw-r--r-- | src/cache/cache_las.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cache/cache_las.c b/src/cache/cache_las.c index fd541458fa8..27c2900fa98 100644 --- a/src/cache/cache_las.c +++ b/src/cache/cache_las.c @@ -42,6 +42,17 @@ __wt_las_stats_update(WT_SESSION_IMPL *session) WT_STAT_SET(session, cstats, cache_lookaside_insert, v); v = WT_STAT_READ(dstats, cursor_remove); WT_STAT_SET(session, cstats, cache_lookaside_remove, v); + /* + * If we're clearing stats we need to clear the cursor values we just + * read. This does not clear the rest of the statistics in the + * lookaside data source stat cursor, but we own that namespace so we + * don't have to worry about users seeing inconsistent data source + * information. + */ + if (FLD_ISSET(conn->stat_flags, WT_CONN_STAT_CLEAR)) { + WT_STAT_SET(session, dstats, cursor_insert, 0); + WT_STAT_SET(session, dstats, cursor_remove, 0); + } } /* |