We use callbacks extensively throughout our code as a means of
providing streamy feedback to callers. It's a pretty good paradigm,
and one that has served us well. We don't put many restrictions on
what the callbacks can do in terms of fetching more information or
calling other functions.
Stefan's patch to make a recursive proplist much more performant
highlights the great benefit that our sqlite-backed storage can have.
However, he reverted it due to concerns about the potential for
database contention. The theory was that the callback might try and
call additional wc functions to get more information, and such nested
statements weren't healthy for sqlite. We talked about it for a bit
in IRC this morning, and the picture raised by this issue was quite
In an attempt to find out what the consequences of these nested
queries are, I wrote a test program to attempt to demonstrate the
failure, only now I can't seem to do so. Attached is the test
program, but when I run it, I'm able to successfully execute multiple
prepared statements on the same set of rows simultaneously, which was
the concern we had about our callback mechanism in sqlite.
So is this a valid problem? If so, could somebody use the attached
test program to illustrate it for those of us who may not fully
understand the situation?
Received on 2010-11-30 02:44:21 CET
- text/x-csrc attachment: test.c