[elephant-devel] Dropping DB connection during writes
Alex Mizrahi
killerstorm at newmail.ru
Fri Nov 21 22:30:10 UTC 2008
IE> What interface do you use to deal with opening/closing separate
IE> connections in your system?
connection management is not a problem.
problem is that close-store unconditionally makes controller totally
unusable, and that might cause problem if there are some with-open-store
commands going concurrently.
if we're not going to create separate controller for each open-store,
maybe it makes sense to add sort of refcounting, either on with-open-store
on on open-store/close-store level. so each open-store should be matched
with corresponding close-store, and controller is only finally closed when
there are no references to it. i.e. if you call open-store three times
(either
in one thread or in many), first two close-stores will do nothing, and third
one will close it.
i've seen such "technique" being implemented in many APIs that are
dealing with initialization/deinitialization, btw..
but as nobody complains (Tayssir had other problem), this is probably
low-priority thing.. might save someone from WTF moments in future,
maybe..
More information about the elephant-devel
mailing list