[elephant-devel] Re: test concurrent
Alex Mizrahi
killerstorm at newmail.ru
Fri Apr 11 12:49:15 UTC 2008
AM> but there is no clue how to do this and check..
ok, nevermind, there is option to open-store..
..but there are no default values to it, so it does not work in
with-open-store, so do-test-spec will fail for sure.
so i had to use "run!" directly.
then, running 5 threads that try to update same 10 objects yielded lots of
retry-count-exceeded errors, which is quite weird, with defaul retry count
of 200..
it seems BDB aborts _both_ processes in case of deadlock (unlike PostgreSQL
aborting only one and allowing other to complete, so it always make
progress).
maybe there should be some delay before retries?
i've tested randomized delays in retry loop (execute-transaction of bdb)
(loop
for count fixnum from 0 to retries
for success of-type boolean = nil
when (plusp count) do (sleep (random 0.3))
and it was working fine!
number 0.3 is not entirely random -- with constant delay of 0.01 it passes
simple 5-thread tests, but starves on brutal 30-thread test.
neithe (random 0.1) was enough (albeit better), and with (random 0.3) it
passes all tests without starvation.
so it passes all tests except threaded-object-creation-0 and
threaded-object-creation-0-i, which also fail with postmodern backend (i've
wrote about it before).
More information about the elephant-devel
mailing list