diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-03-27 14:18:53 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-03-27 14:18:53 +1100 |
commit | 5b8f84ed137e8d9d6cdcb8addbf4e2865f0e9007 (patch) | |
tree | 2febc18285d74ae81ff34afe0684ab8b3819be1e | |
parent | b6d2f5360519f1356d7184363236e7dee188469c (diff) | |
parent | 881642ba2af2f7b21140819d7521746fa5603c6b (diff) | |
download | mongo-5b8f84ed137e8d9d6cdcb8addbf4e2865f0e9007.tar.gz |
Merge pull request #1832 from wiredtiger/split-gen-paranoia
Add an assert to the split free method.
-rw-r--r-- | src/btree/bt_split.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c index 99817eb4d04..2723813a043 100644 --- a/src/btree/bt_split.c +++ b/src/btree/bt_split.c @@ -147,6 +147,9 @@ static int __split_safe_free(WT_SESSION_IMPL *session, uint64_t split_gen, int exclusive, void *p, size_t s) { + /* We should only call safe free if we aren't pinning the memory. */ + WT_ASSERT(session, session->split_gen != split_gen); + /* * We have swapped something in a page: if we don't have exclusive * access, check whether there are other threads in the same tree. |