diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-06-14 15:57:18 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2017-06-14 15:57:18 -0400 |
commit | e560dbee85143ecc78c9e6b41b66af179a9f81a5 (patch) | |
tree | f755663deaf60f1aaaca801970eabe4757fcbaa9 /src/meta/meta_table.c | |
parent | 84429199fd94f8a8201c5aa77432a2557d326902 (diff) | |
download | mongo-e560dbee85143ecc78c9e6b41b66af179a9f81a5.tar.gz |
SERVER-29439 WiredTiger turtle file "MoveFileExW: Access is denied." error. (#3460)
Opening a metadata cursor, which reads the turtle file for the metadata file checkpoint, can race with a checkpoint renaming a new turtle file into place, and Windows doesn't support renaming a currently open file.
Diffstat (limited to 'src/meta/meta_table.c')
-rw-r--r-- | src/meta/meta_table.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/meta/meta_table.c b/src/meta/meta_table.c index 65835a16c8b..326ad12bd33 100644 --- a/src/meta/meta_table.c +++ b/src/meta/meta_table.c @@ -267,7 +267,9 @@ __wt_metadata_search(WT_SESSION_IMPL *session, const char *key, char **valuep) * that Coverity complains a lot, add an error check to get some * peace and quiet. */ - if ((ret = __wt_turtle_read(session, key, valuep)) != 0) + WT_WITH_TURTLE_LOCK(session, + ret = __wt_turtle_read(session, key, valuep)); + if (ret != 0) __wt_free(session, *valuep); return (ret); } |