sqlite driver connection is not lazy

Bug #1257093 reported by Flavio Percoco on 2013-12-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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

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

Changed in marconi:
status: New → In Progress

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) on 2013-12-19
Changed in marconi:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in marconi:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers