Skip to content
  • David Johnson's avatar
    Python interface to db is now most of the way up to speed with · 5da05762
    David Johnson authored
    libdb.pm.in.  There's a nasty little hack to deal with forks, because the
    underlying python mysql db module does not help us deal with them.
    Basically, there is no way (and I mean no way!) to close a connection in
    the child without actually sending a disconnect to the server... so the
    parent's connection gets killed too.  The only way around this is to hack
    the Python C API wrapper that the mysql python module is built on.  For
    now, we just close off both connections before a fork via a TBDBPreFork(),
    and restore them implicitly on the first query after the fork.  It sucks,
    but it's the best we can do until hacking the mysql module.
    
    Anyway, the big fix is that testbed-ops no longer gets spammed with
    DBQuery failures; they are retried just like in libdb.pm.in.
    5da05762