about summary refs log tree commit
path: root/lib/metropolis/tc/hdb/ro.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-11-23 19:45:52 -0800
committerEric Wong <normalperson@yhbt.net>2010-11-23 19:45:52 -0800
commit61120b1268679bb8ffa157736e91e6846fd2a372 (patch)
tree26ca738b3208164e7438599b7f25b3248cf76db8 /lib/metropolis/tc/hdb/ro.rb
parent0f3c1c14630fda58363ffd7d3a942041ca2419eb (diff)
downloadmetropolis-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.rb1
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)
       }