diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-12-05 16:00:08 +1100 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-12-05 16:24:35 +1100 |
commit | b74f8750d92f1dc31469261d8fbfe359ae759c29 (patch) | |
tree | 8c15b6c91170239c551f11a1e316fdb057bd83c0 /src/third_party/wiredtiger/src/log/log.c | |
parent | 51ada5ef6dafa2ca29d329edb0a93fc1a91e2ad0 (diff) | |
download | mongo-b74f8750d92f1dc31469261d8fbfe359ae759c29.tar.gz |
Import wiredtiger: fcb59a43a44222716ddae6d94d45cdfd36b915f7 from branch mongodb-4.2
ref: 74aa2f92a9..fcb59a43a4
for: 4.1.7
WT-4192 Remove WiredTiger raw compression support
WT-4319 Improvements to csuite tests
WT-4331 Further extend max wait time for test_bug019.py
WT-4393 Document cursor behaviour for read committed isolation
WT-4410 Split 'unit-test' task to reduce Evergreen Ubuntu build variant runtime
WT-4417 Make os_cache_max and os_cache_dirty_max reconfigurable
WT-4421 Add a way to calculate modify operations
WT-4434 Modify zstd compression level from 3 to 6
WT-4442 Add the ability to duplicate a backup cursor
WT-4455 test_wt4156_metadata_salvage with HAVE_ATTACH fails on zSeries
WT-4457 Add a maximum of dirty system buffers for the logging subsystem
WT-4463 Reduce runtime for csuite handle locks testing
WT-4464 In debug output row-store internal page keys may not format correctly
WT-4469 Coverity #105148: redundant test
Diffstat (limited to 'src/third_party/wiredtiger/src/log/log.c')
-rw-r--r-- | src/third_party/wiredtiger/src/log/log.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c index 690c5841ac8..9e520084e3c 100644 --- a/src/third_party/wiredtiger/src/log/log.c +++ b/src/third_party/wiredtiger/src/log/log.c @@ -1348,6 +1348,7 @@ __log_newfile(WT_SESSION_IMPL *session, bool conn_open, bool *created) log->write_lsn = end_lsn; log->write_start_lsn = end_lsn; } + log->dirty_lsn = log->alloc_lsn; if (created != NULL) *created = create_log; return (0); @@ -2053,7 +2054,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) * responsible for freeing the slot in that case. Otherwise the * worker thread will free it. */ - if (!F_ISSET(slot, WT_SLOT_FLUSH | WT_SLOT_SYNC | WT_SLOT_SYNC_DIR)) { + if (!F_ISSET(slot, WT_SLOT_FLUSH | WT_SLOT_SYNC_FLAGS)) { if (freep != NULL) *freep = 0; slot->slot_state = WT_LOG_SLOT_WRITTEN; @@ -2090,6 +2091,16 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep) if (F_ISSET(slot, WT_SLOT_CLOSEFH)) __wt_cond_signal(session, conn->log_file_cond); + if (F_ISSET(slot, WT_SLOT_SYNC_DIRTY) && !F_ISSET(slot, WT_SLOT_SYNC) && + (ret = __wt_fsync(session, log->log_fh, false)) != 0) { + /* + * Ignore ENOTSUP, but don't try again. + */ + if (ret != ENOTSUP) + WT_ERR(ret); + conn->log_dirty_max = 0; + } + /* * Try to consolidate calls to fsync to wait less. Acquire a spin lock * so that threads finishing writing to the log will wait while the |