I think a count of the number of currently open cursors is a good stat to have, but I don't see any locks we can use to make sure that count doesn't get messed up (in the last run, it obviously went negative a bunch).
Do you see a lock I don't see?
Is it worth adding a spinlock?
We could add a set of stat calls that use WT_ATOMIC_ADD/SUB to ensure we don't race on a particular stat value?
Anybody have a better idea?
Sue says:
> If we want to keep this for real then it needs to be accurate. I am undecided at the moment on if we want it long term. However, if we do, we certainly don't expect the number to exceed 32 bits. So I think a set of macros using ATOMIC is better than a spinlock.
- related to
-
WT-516 open-cursor counts, LSM statistics re-enable
- Closed