summaryrefslogtreecommitdiff
path: root/src/schema
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-11-03 10:14:11 -0500
committerKeith Bostic <keith@wiredtiger.com>2015-11-03 10:14:11 -0500
commit721c8e63792d18b61ae367a795091842ab22c5d8 (patch)
treee1a130dba65b21b28b2901ecd529a5ea2d329298 /src/schema
parent7e6e404425e219f301fede1d3723cedd30835a02 (diff)
downloadmongo-721c8e63792d18b61ae367a795091842ab22c5d8.tar.gz
WT-2196: A different solution, don't require callers to log their own error
messages, instead pass down a "silent" flag to keep the underlying OS layer function silent.
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/schema_stat.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/schema/schema_stat.c b/src/schema/schema_stat.c
index d14b81d389f..88f92b71599 100644
--- a/src/schema/schema_stat.c
+++ b/src/schema/schema_stat.c
@@ -89,12 +89,15 @@ __curstat_size_only(WT_SESSION_IMPL *session,
/* Build up the file name from the table URI. */
WT_ERR(__wt_buf_fmt(
session, &namebuf, "%s.wt", uri + strlen("table:")));
+
/*
- * Get the size of the underlying file. There is nothing stopping a
- * race with schema level table operations (for example drop) if there
- * is a race there will be an error message generated.
+ * Get the size of the underlying file. This will fail for anything
+ * other than simple tables (LSM for example) and will fail if there
+ * are concurrent schema level operations (for example drop). That is
+ * fine - failing here results in falling back to the slow path of
+ * opening the handle.
*/
- WT_ERR(__wt_filesize_name(session, namebuf.data, &filesize));
+ WT_ERR(__wt_filesize_name(session, namebuf.data, true, &filesize));
/* Setup and populate the statistics structure */
__wt_stat_dsrc_init_single(&cst->u.dsrc_stats);