summaryrefslogtreecommitdiff
path: root/src/os_posix
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-12-06 21:52:34 -0500
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-12-07 13:52:34 +1100
commit1adda6a0a51e51ffa5a3fa9cf86f6f765585a5f4 (patch)
tree489278ba31b4a033111e33a0337fd9a545ebdabf /src/os_posix
parentc68e35c4c8aca43ebfebaf1ed8a68bef71ccb4cc (diff)
downloadmongo-1adda6a0a51e51ffa5a3fa9cf86f6f765585a5f4.tar.gz
WT-2960 Reduce likelihood of using the lookaside file, especially when inserting multi-megabyte values (#3171)
Don't configure the lookaside table as soon as eviction is stuck, only configure the lookaside table if update/restore reconciliation fails and there's reason to believe the lookaside table will be effective, based on the updates that were skipped during the update/restore reconciliation. The evaluation of whether an update/restore reconciliation would make progress was a check for a single block rewrite with no updates to restore or at least one update chain without a skipped entry. Check more deeply, if there's any block without updates to be restored or at least 10% of the update chains didn't have skipped entries, assume we're making progress.
Diffstat (limited to 'src/os_posix')
-rw-r--r--src/os_posix/os_fs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/os_posix/os_fs.c b/src/os_posix/os_fs.c
index 26be0f049cc..bc8cbf67025 100644
--- a/src/os_posix/os_fs.c
+++ b/src/os_posix/os_fs.c
@@ -687,8 +687,7 @@ __posix_open_file(WT_FILE_SYSTEM *file_system, WT_SESSION *wt_session,
advise_flag = POSIX_FADV_RANDOM;
if (LF_ISSET(WT_FS_OPEN_ACCESS_SEQ))
advise_flag = POSIX_FADV_SEQUENTIAL;
- WT_SYSCALL(
- posix_fadvise(pfh->fd, 0, 0, advise_flag), ret);
+ WT_SYSCALL(posix_fadvise(pfh->fd, 0, 0, advise_flag), ret);
if (ret != 0)
WT_ERR_MSG(session, ret,
"%s: handle-open: posix_fadvise", name);