Skip to content

Commit

Permalink
Filemgr_openlock to be acquired for a hash table scan
Browse files Browse the repository at this point in the history
Context: filemgr_shutdown() in src/filemgr.cc

Change-Id: I413eb81c134c59a4589d9d7c08f590c15a0506de
Reviewed-on: http://review.couchbase.org/62461
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  • Loading branch information
abhinavdangeti authored and chiyoung committed Apr 5, 2016
1 parent 89e47c0 commit 93b9365
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/filemgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,9 @@ fdb_status filemgr_shutdown()
return ret;
}

spin_lock(&filemgr_openlock);
open_file = hash_scan(&hash, _filemgr_is_closed, NULL);
spin_unlock(&filemgr_openlock);
if (!open_file) {
hash_free_active(&hash, filemgr_free_func);
if (global_config.ncacheblock > 0) {
Expand Down

0 comments on commit 93b9365

Please sign in to comment.