summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSusan LoVerso <sue@mongodb.com>2016-02-09 13:33:45 -0500
committerSusan LoVerso <sue@mongodb.com>2016-02-09 13:33:45 -0500
commit9fe1439f18538ffcb7f7d60438944e9d6a6df117 (patch)
treedd9240d5a1393223ea5661cbc6b1fbd1db3db090
parent3d269cddf9d1140151e0ef1ce0f619636e3299dc (diff)
downloadmongo-9fe1439f18538ffcb7f7d60438944e9d6a6df117.tar.gz
WT-2349 For readonly don't sync log on close.
-rw-r--r--src/log/log.c10
-rw-r--r--src/lsm/lsm_tree.c6
-rw-r--r--test/suite/test_readonly01.py2
3 files changed, 11 insertions, 7 deletions
diff --git a/src/log/log.c b/src/log/log.c
index 26c6aed95ae..03145d8408c 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -1173,20 +1173,24 @@ __wt_log_close(WT_SESSION_IMPL *session)
if (log->log_close_fh != NULL && log->log_close_fh != log->log_fh) {
WT_RET(__wt_verbose(session, WT_VERB_LOG,
"closing old log %s", log->log_close_fh->name));
- WT_RET(__wt_fsync(session, log->log_close_fh));
+ if (!F_ISSET(conn, WT_CONN_READONLY))
+ WT_RET(__wt_fsync(session, log->log_close_fh));
WT_RET(__wt_close(session, &log->log_close_fh));
}
if (log->log_fh != NULL) {
WT_RET(__wt_verbose(session, WT_VERB_LOG,
"closing log %s", log->log_fh->name));
- WT_RET(__wt_fsync(session, log->log_fh));
+ if (!F_ISSET(conn, WT_CONN_READONLY))
+ WT_RET(__wt_fsync(session, log->log_fh));
WT_RET(__wt_close(session, &log->log_fh));
log->log_fh = NULL;
}
if (log->log_dir_fh != NULL) {
WT_RET(__wt_verbose(session, WT_VERB_LOG,
"closing log directory %s", log->log_dir_fh->name));
- WT_RET(__wt_directory_sync_fh(session, log->log_dir_fh));
+ if (!F_ISSET(conn, WT_CONN_READONLY))
+ WT_RET(
+ __wt_directory_sync_fh(session, log->log_dir_fh));
WT_RET(__wt_close(session, &log->log_dir_fh));
log->log_dir_fh = NULL;
}
diff --git a/src/lsm/lsm_tree.c b/src/lsm/lsm_tree.c
index cdf2bc0595c..33cfb242a1e 100644
--- a/src/lsm/lsm_tree.c
+++ b/src/lsm/lsm_tree.c
@@ -424,9 +424,9 @@ __wt_lsm_tree_create(WT_SESSION_IMPL *session,
/*
* Set up the config for each chunk.
*
- * Make the memory_page_max double the chunk size, so application
- * threads don't immediately try to force evict the chunk when the
- * worker thread clears the NO_EVICTION flag.
+ * Make the memory_page_max double the chunk size, so
+ * application threads don't immediately try to force evict
+ * the chunk when the worker thread clears the NO_EVICTION flag.
*/
WT_ERR(__wt_scr_alloc(session, 0, &buf));
WT_ERR(__wt_buf_fmt(session, buf,
diff --git a/test/suite/test_readonly01.py b/test/suite/test_readonly01.py
index 8d8f6a6a293..4cc65405301 100644
--- a/test/suite/test_readonly01.py
+++ b/test/suite/test_readonly01.py
@@ -27,7 +27,7 @@
# OTHER DEALINGS IN THE SOFTWARE.
#
# test_readonly01.py
-# Transactions: Test readonly mode
+# Readonly: Test readonly mode.
#
import fnmatch, os, shutil, time