Bug 1688115

Summary: Data heal not checking for locks on source & sink(s) before healing
Product: [Community] GlusterFS Reporter: Karthik U S <ksubrahm>
Component: replicateAssignee: Karthik U S <ksubrahm>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, pkarampu, ravishankar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-13 09:39:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karthik U S 2019-03-13 07:29:20 UTC
Description of problem:

During data heal, we try to take locks on all the bricks, but we do not check for whether we got the lock on at least the source and one of the sink bricks before starting the heal.
In function afr_selfheal_data_block(), we only check for the lock count to be equal to or greater than the number of sinks. There can be a case where we have 2 source bricks and one sink and the locking is successful on only the source brick(s). In this case we continue with the healing on sink without having a lock, which is not correct.

Comment 1 Worker Ant 2019-03-13 07:37:33 UTC
REVIEW: https://review.gluster.org/22349 (cluster/afr: Check for lock on source & sink before doing data heal) posted (#1) for review on master by Karthik U S

Comment 2 Worker Ant 2020-02-13 09:39:23 UTC
REVIEW: https://review.gluster.org/22349 (cluster/afr: Check for lock on source & sink before doing data heal) merged (#2) on master by Pranith Kumar Karampuri