#1294 Starvation issues with LOCKS transaction mode

engine (518)

I'm seeing starvation problems with LOCKS transaction mode.

Basically, in a single-writer/multiple-readers scenario, there seem to
be many reader threads hanging on the latch.await call, with very
little reason, given the waited sessions committed already (which
should count down the latch).

I had some little time to look at the code and I believe it may be an
issue in the transaction manager resetLocks and resetLatches methods:
waited sets are computed by the former in session order, and then
latches are released/updated in the *same* order; this may cause the
first session (the one who got the locks) to terminate *before* the
dependant sessions have inserted themselves as waiting sessions, hence
causing the waiting sessions (the ones who do not got the locks)
hanging forever on the latch (as the session that should have counted
them down completed already).

Here's attached a patch to "unlock" sessions after all waiting sets have been computed.


  • Fred Toussi

    Fred Toussi - 2013-05-31
    • assigned_to: nobody --> fredt
    • priority: 5 --> 1
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks