summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsueloverso <sue@mongodb.com>2017-11-15 22:37:15 -0500
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-11-16 14:37:15 +1100
commite563edadf73a8179f463ac0261606a911e86664d (patch)
tree8685eb0952550d418039da987505204e86937648 /src
parent71339772c8aa6edef0089c554104acc9a434be4a (diff)
downloadmongo-e563edadf73a8179f463ac0261606a911e86664d.tar.gz
WT-3746 Don't busy wait when syncing the log and waiting for writes to complete. (#3791)
Diffstat (limited to 'src')
-rw-r--r--src/log/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/log/log.c b/src/log/log.c
index 4c32b9b02ed..17c77f532bb 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -2658,8 +2658,10 @@ __wt_log_flush(WT_SESSION_IMPL *session, uint32_t flags)
* Wait until all current outstanding writes have been written
* to the file system.
*/
- while (__wt_log_cmp(&last_lsn, &lsn) > 0)
+ while (__wt_log_cmp(&last_lsn, &lsn) > 0) {
+ __wt_sleep(0, WT_THOUSAND);
WT_RET(__wt_log_flush_lsn(session, &lsn, false));
+ }
__wt_verbose(session, WT_VERB_LOG,
"log_flush: flags %#" PRIx32 " LSN %" PRIu32 "/%" PRIu32,