tc/hdb: add exclusive mode, lock disabling
commit61120b1268679bb8ffa157736e91e6846fd2a372
authorEric Wong <normalperson@yhbt.net>
Wed, 24 Nov 2010 03:45:52 +0000 (23 19:45 -0800)
committerEric Wong <normalperson@yhbt.net>
Wed, 24 Nov 2010 03:45:52 +0000 (23 19:45 -0800)
tree26ca738b3208164e7438599b7f25b3248cf76db8
parent0f3c1c14630fda58363ffd7d3a942041ca2419eb
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.
lib/metropolis/common.rb
lib/metropolis/tc/hdb.rb
lib/metropolis/tc/hdb/ex.rb [new file with mode: 0644]
lib/metropolis/tc/hdb/ro.rb
test/rack_read_write.rb
test/test_tc_hdb.rb