diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2015-03-26 18:03:39 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2015-03-26 18:03:39 +1100 |
commit | 44dcc0143ba74bdfd2e9510cb5acb03d68274e25 (patch) | |
tree | ffb5827168090a9e50514083f17af9dd0a33f163 | |
parent | 7362680364ea755627ed6d7c89b3a1acb3eb4eb3 (diff) | |
download | mongo-44dcc0143ba74bdfd2e9510cb5acb03d68274e25.tar.gz |
The handle sweep code should handle busy returns.
While in there ensure (extremely unlikely) non-busy error returns for
write locks are handled properly.
Refs: http://build.wiredtiger.com:8080/job/wiredtiger-test-format-stress/6460/console
-rw-r--r-- | src/conn/conn_sweep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/conn/conn_sweep.c b/src/conn/conn_sweep.c index a74bc51613f..90773a621e2 100644 --- a/src/conn/conn_sweep.c +++ b/src/conn/conn_sweep.c @@ -33,6 +33,7 @@ __sweep_remove_handles(WT_SESSION_IMPL *session) if ((ret = __wt_try_writelock(session, dhandle->rwlock)) == EBUSY) continue; + WT_RET(ret); /* * If there are no longer any references to the handle in any @@ -54,7 +55,7 @@ __sweep_remove_handles(WT_SESSION_IMPL *session) WT_STAT_FAST_CONN_INCR(session, dh_conn_ref); } - return (ret); + return (ret == EBUSY ? 0 : ret); } /* @@ -112,6 +113,7 @@ __sweep(WT_SESSION_IMPL *session) if ((ret = __wt_try_writelock(session, dhandle->rwlock)) == EBUSY) continue; + WT_RET(ret); /* Only sweep clean trees where all updates are visible. */ btree = dhandle->handle; |