diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-10-07 15:28:01 +1100 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-10-07 15:28:01 +1100 |
commit | 6a31c2118cce88c68281eda2ca9ab1df915a2773 (patch) | |
tree | 21fb229070aa02ac8ad942254cfc516ece22a9d3 /src/include/btree.i | |
parent | fc0e7abe82595e579573d42448632f7b36a2d154 (diff) | |
parent | d6c7a001dded7b000a08d8675592f912ccdbab79 (diff) | |
download | mongo-6a31c2118cce88c68281eda2ca9ab1df915a2773.tar.gz |
Merge branch 'develop' into mongodb-3.4mongodb-3.4.0-rc1
Diffstat (limited to 'src/include/btree.i')
-rw-r--r-- | src/include/btree.i | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/include/btree.i b/src/include/btree.i index a9ce4f754a9..74ebf74f1e9 100644 --- a/src/include/btree.i +++ b/src/include/btree.i @@ -522,14 +522,22 @@ __wt_page_modify_set(WT_SESSION_IMPL *session, WT_PAGE *page) * might result in an extra checkpoint that doesn't do any work but it * shouldn't cause problems; regardless, let's play it safe.) */ - if (S2BT(session)->modified == 0) { + if (!S2BT(session)->modified) { /* Assert we never dirty a checkpoint handle. */ WT_ASSERT(session, session->dhandle->checkpoint == NULL); - S2BT(session)->modified = 1; + S2BT(session)->modified = true; WT_FULL_BARRIER(); } + /* + * There is a possibility of btree being dirty whereas connection being + * clean when entering this function. So make sure to update connection + * to dirty outside a condition on btree modified flag. + */ + if (!S2C(session)->modified) + S2C(session)->modified = true; + __wt_page_only_modify_set(session, page); } |