diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/btree/bt_walk.c')
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_walk.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/third_party/wiredtiger/src/btree/bt_walk.c b/src/third_party/wiredtiger/src/btree/bt_walk.c index dc1cf4e7f98..fb0d2296823 100644 --- a/src/third_party/wiredtiger/src/btree/bt_walk.c +++ b/src/third_party/wiredtiger/src/btree/bt_walk.c @@ -472,27 +472,14 @@ restart: /* empty_internal = false; } else if (LF_ISSET(WT_READ_COMPACT)) { /* - * Skip deleted pages, rewriting them doesn't - * seem useful. + * Compaction has relatively complex tests to + * decide if a page can be skipped, call out + * to a helper function. */ - if (ref->state == WT_REF_DELETED) + WT_ERR(__wt_compact_page_skip( + session, ref, &skip)); + if (skip) break; - - /* - * If the page is in-memory, we want to look at - * it (it may have been modified and written, - * and the current location is the interesting - * one in terms of compaction, not the original - * location). If the page isn't in-memory, test - * if the page will help with compaction, don't - * read it if we don't have to. - */ - if (ref->state == WT_REF_DISK) { - WT_ERR(__wt_compact_page_skip( - session, ref, &skip)); - if (skip) - break; - } } else { /* * Try to skip deleted pages visible to us. |