Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-513

maintain a count of open cursors

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.6.0
    • Affects Version/s: None
    • Component/s: None

      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.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: