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

maintain a count of open cursors

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: WT1.6.0
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: