wiredtiger/wiredtiger — pull request #254 by michaelcahill (2012-07-03 02:12:53+00:00)
Title: Can you please review this change to simplify locking?

The basic idea is to push most locking up to the API and use schema_lock to
protect any calls that access the connection's list of btree handles.
Checkpoint needs to access the list of handles anyway, so this also serializes
checkpoints.

The old "general purpose" connection spinlock has been renamed "api_lock" for
clarity: it protects other lists in the connection, including the list of
session handles.

This change is a little noisy: I'm still using a flag in the session to mark
that the session has the schema lock -- the assertions are there to make sure I
got all of the paths.

Let me know what you think, this removes some code that has been bugging me,
and causing hangs in automated testing.

Thanks,
Michael.