diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-01-14 14:57:27 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-01-14 14:57:27 -0500 |
commit | 2aae973c0925049c0e296fdda78310787ed37839 (patch) | |
tree | 0ad6fdf52c33b32522e9900897034d14400813bc /src/session/session_dhandle.c | |
parent | 00dd453e0e2fb2f36d7ed75d643893c12cbc49f9 (diff) | |
download | mongo-2aae973c0925049c0e296fdda78310787ed37839.tar.gz |
WT-60: big endian support
The cityhash code isn't endian-independent, so we can't cache the same
metadata file name value on both little- and big-endian systems. Cache
a value in the WT_CONNECTION_IMPL structure when we start up.
Diffstat (limited to 'src/session/session_dhandle.c')
-rw-r--r-- | src/session/session_dhandle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/session/session_dhandle.c b/src/session/session_dhandle.c index cf58cd29e83..3a2d5ea4fc5 100644 --- a/src/session/session_dhandle.c +++ b/src/session/session_dhandle.c @@ -72,7 +72,8 @@ __session_find_dhandle(WT_SESSION_IMPL *session, bucket = __wt_hash_city64(uri, strlen(uri)) % WT_HASH_ARRAY_SIZE; retry: TAILQ_FOREACH(dhandle_cache, &session->dhhash[bucket], hashq) { dhandle = dhandle_cache->dhandle; - if (WT_DHANDLE_INACTIVE(dhandle) && !WT_IS_METADATA(dhandle)) { + if (WT_DHANDLE_INACTIVE(dhandle) && + !WT_IS_METADATA(session, dhandle)) { __session_discard_dhandle(session, dhandle_cache); /* We deleted our entry, retry from the start. */ goto retry; @@ -407,7 +408,7 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session) difftime(now, dhandle->timeofdeath) > conn->sweep_idle_time))) { WT_STAT_FAST_CONN_INCR(session, dh_session_handles); - WT_ASSERT(session, !WT_IS_METADATA(dhandle)); + WT_ASSERT(session, !WT_IS_METADATA(session, dhandle)); __session_discard_dhandle(session, dhandle_cache); } dhandle_cache = dhandle_cache_next; |