Race condition in journal between event write and thread processing

Bug #1569986 reported by Mike Kolesnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-odl
Fix Released
Undecided
Mike Kolesnik

Bug Description

Journal rows are written in the pre-commit hook, thus available only when the original operation (i.e. add port) commits.
The journal is triggered on the end of the pre-commit hook to handle the event asynchronously with a new DB transaction.

Therefore, if the commit doesn't happen before the journal tries to read the row it won't see it yet and the processing will only occur on the next thread run (after interval has passed).

Mike Kolesnik (mkolesni)
Changed in networking-odl:
assignee: nobody → Mike Kolesnik (mkolesni)
Revision history for this message
yalei wang (yalei-wang) wrote :

good point!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-odl (master)

Reviewed: https://review.openstack.org/306818
Committed: https://git.openstack.org/cgit/openstack/networking-odl/commit/?id=1962b0a15188e411d4b9a955530a899351f8a27a
Submitter: Jenkins
Branch: master

commit 1962b0a15188e411d4b9a955530a899351f8a27a
Author: oshvartz <email address hidden>
Date: Sun Apr 17 12:21:24 2016 +0300

    Fix race between event write and thread processing

    Journal rows are written in the pre-commit hook,
    thus available only when the original operation (i.e. add port) commits.
    In order to prevent race condition the journal triggering was moved
    from pre-commit to post-commit.

    Change-Id: I0b52ccb43b405e7dd3d4f65066169a8bbee58c39
    Closes-Bug: #1569986

Changed in networking-odl:
status: New → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/networking-odl 2.0.0

This issue was fixed in the openstack/networking-odl 2.0.0 release.

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.