diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-12-17 19:06:11 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-12-17 21:11:19 -0500 |
commit | 46589450c11ce5cc8cfef2eaf47342d53b271a35 (patch) | |
tree | 6427ca95a37b92747e919e6b3c90e93e703f7251 /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | |
parent | a77d104ecf7ed76ba93b54bf167fae8bdc3ad6a2 (diff) | |
download | mongo-46589450c11ce5cc8cfef2eaf47342d53b271a35.tar.gz |
SERVER-16562: Do fast wiredtiger shutdown
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 7431fff7e05..d563811a9de 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -49,6 +49,10 @@ #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" +#if !defined(__has_feature) +#define __has_feature(x) 0 +#endif + namespace mongo { namespace { @@ -198,8 +202,12 @@ namespace mongo { // this must be the last thing we do before _conn->close(); _sessionCache->shuttingDown(); - // TODO consider passing "leak_memory=true" to close() when not running a leak checker. - invariantWTOK( _conn->close(_conn, NULL) ); +#if !__has_feature(address_sanitizer) + const char* config = "leak_memory=true"; +#else + const char* config = NULL; +#endif + invariantWTOK( _conn->close(_conn, config) ); _conn = NULL; } } |