Jim Starkey wrote:
> Here's another idea. Define an "in-use" flag in the transaction
> object. Before a scavenge, clear the in-use flag for transactions.
> During scavenge, set the flag on every transaction referenced. At the
> end of scavenge, purge all transaction that are a) committed and b)
> not marked as in-use.
> Since the flag is used exclusively by the scavenge thread, no locking
> is required.
Sigh. This suffers from the same problem as most of the other
proposals, which is no guarantee that another thread doesn't have a
stale pointer to the transaction. Oh, well.
Cycle locks, anyone...
President, NimbusDB, Inc.