diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-11-23 19:45:52 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-11-23 19:45:52 -0800 |
commit | 61120b1268679bb8ffa157736e91e6846fd2a372 (patch) | |
tree | 26ca738b3208164e7438599b7f25b3248cf76db8 /lib/metropolis/tc/hdb/ro.rb | |
parent | 0f3c1c14630fda58363ffd7d3a942041ca2419eb (diff) | |
download | metropolis-61120b1268679bb8ffa157736e91e6846fd2a372.tar.gz |
tc/hdb: add exclusive mode, lock disabling
The :exclusive mode behaves like TokyoTyrant and keeps the database opened in read-write mode, preventing other processes from accessing the database. This will be useful on Rubies without a GVL. :readonly no longer disables locking by default instead "rdlock=false" must be passed in the query parameter. Write locks may also be disabled with the "wrlock=false" query parameter.
Diffstat (limited to 'lib/metropolis/tc/hdb/ro.rb')
-rw-r--r-- | lib/metropolis/tc/hdb/ro.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/metropolis/tc/hdb/ro.rb b/lib/metropolis/tc/hdb/ro.rb index fddd73c..62ededc 100644 --- a/lib/metropolis/tc/hdb/ro.rb +++ b/lib/metropolis/tc/hdb/ro.rb @@ -6,7 +6,6 @@ module Metropolis::TC::HDB::RO def self.extended(obj) obj.instance_eval do @wr_flags = nil - @rd_flags |= TokyoCabinet::HDB::ONOLCK @dbv.each { |(hdb, path)| hdb.open(path, @rd_flags) or ex!(:open, hdb) } |