sqlite driver connection is not lazy

Bug #1257093 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Medium
Flavio Percoco

Bug Description

The sqlite backend is not lazy enough and it fails to execute queries when sqlite objects are accessed from different threads.

Make sure the connection is created at the very last moment.

Changed in marconi:
importance: Undecided → Medium
assignee: nobody → Flavio Percoco (flaper87)
milestone: none → icehouse-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to marconi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/59566

Changed in marconi:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/59566
Committed: http://github.com/openstack/marconi/commit/ce5a814cb1731b817cbb74aa892dfd94304e1b28
Submitter: Jenkins
Branch: master

commit ce5a814cb1731b817cbb74aa892dfd94304e1b28
Author: Flavio Percoco <email address hidden>
Date: Mon Dec 2 23:19:11 2013 +0100

    Make sqlite connection lazy

    The patch makes sqlite database connection lazy.

    If the sqlite connection is created in a thread and then accessed from
    another one, it'll fail mentioning that the connection is not thread
    safe and that sqlite objects should be accessed from within the thread
    the connection was created in.

    Creating the connection instance at the very end alleviates this issue
    but it doesn't fix it completely. It is still possible to create a
    connection in a sub thread and then access it from another one. This
    patch just makes that less probable by creating the instance when it's
    actually needed.

    Closes-bug: 1257093

    Change-Id: I2ce46c20158fbf090a25736b3afc1dd32437af24

Changed in marconi:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in marconi:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in marconi:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.