Bug 1261140 - Database locking due to write contention between CTR sql connection and tier migrator sql connection
Database locking due to write contention between CTR sql connection and tier ...
Status: CLOSED DUPLICATE of bug 1262341
Product: GlusterFS
Classification: Community
Component: tiering (Show other bugs)
3.7.5
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: bugs@gluster.org
bugs@gluster.org
: Triaged
: 1261039 (view as bug list)
Depends On: 1260730 1262341
Blocks: 1260923 1261039
  Show dependency treegraph
 
Reported: 2015-09-08 12:56 EDT by Joseph Elwin Fernandes
Modified: 2016-06-19 20:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1260730
Environment:
Last Closed: 2015-09-12 16:50:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joseph Elwin Fernandes 2015-09-08 12:56:25 EDT
+++ This bug was initially created as a clone of Bug #1260730 +++

Description of problem:
The DB on the brick is been accessed by CTR, for write and
tier migrator, for read and write. The write from tier migrator is reseting
the heat counters after a cycle. Since we are using sqlite, two connections
trying to write would cause a db lock contention. As a result CTR used to fail
to update the db.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Vijay Bellur on 2015-09-07 10:27:02 EDT ---

REVIEW: http://review.gluster.org/12031 (tier/ctr: Solving DB Lock issue due to write contention from db connections) posted (#5) for review on master by Joseph Fernandes

--- Additional comment from Vijay Bellur on 2015-09-08 08:13:06 EDT ---

COMMIT: http://review.gluster.org/12031 committed in master by Dan Lambright (dlambrig@redhat.com) 
------
commit 96af474045c9ba5ab74ca76daa823d91a0a0c610
Author: Joseph Fernandes <josferna@redhat.com>
Date:   Thu Aug 27 17:23:07 2015 +0530

    tier/ctr: Solving DB Lock issue due to write contention from db connections
    
    Problem: The DB on the brick is been accessed by CTR, for write and
    tier migrator, for read and write. The write from tier migrator is reseting
    the heat counters after a cycle. Since we are using sqlite, two connections
    trying to write would cause a db lock contention. As a result CTR used to fail
    to update the db.
    
    Solution: Using the same db connection of CTR for reseting the heat counters.
    1) Introducted a new IPC FOP for CTR
    2) After the query do a ipc syncop to the underlying client xlator associated
       to the brick.
    3) CTR in brick will catch the IPC FOP and cleat the heat counters.
    
    Change-Id: I53306bfc08dcdba479deb4ccc154896521336150
    BUG: 1260730
    Signed-off-by: Joseph Fernandes <josferna@redhat.com>
    Reviewed-on: http://review.gluster.org/12031
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Dan Lambright <dlambrig@redhat.com>
    Tested-by: Dan Lambright <dlambrig@redhat.com>
Comment 1 Vijay Bellur 2015-09-08 13:01:41 EDT
REVIEW: http://review.gluster.org/12130 (tier/ctr: Solving DB Lock issue due to write contention from db connections) posted (#1) for review on release-3.7 by Joseph Fernandes
Comment 2 Dan Lambright 2015-09-12 16:50:21 EDT

*** This bug has been marked as a duplicate of bug 1262341 ***
Comment 3 Joseph Elwin Fernandes 2016-02-14 02:01:34 EST
*** Bug 1261039 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.