Uploaded image for project: 'OpenDNSSEC'
  1. OpenDNSSEC
  2. OPENDNSSEC-312

SQLite internal database locking

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.10
    • Fix Version/s: passe
    • Component/s: Enforcer
    • Labels:
      None

      Description

      Unrelated to our external database lock SQLite also does internal database lock that seems to be able to croak.

      If the user runs ods-ksmutil key list and at the same time the Enforcer starts working it can not succeed since key list will lock tables and Enforcer/sqlite_step() will get back SQLITE_BUSY in most cases it will exit().

      Reading through the SQLite documentation it should be able to handling multiple connections (http://www.sqlite.org/faq.html#q5) SELECT'ing and INSERT'ing at the same time but it does not wait for a lock to be released by default so in some situations we will get back SQLITE_BUSY.

      We should (maybe?) try and use the sqlite3_busy_timeout() function to set our own wait handler with just a sched_yield() so it will retry next context switch.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jerry Jerry Lundström
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: