Bug 1395189

Summary: [RFE] MTSH: Multithreaded healing doesn't have effect on parallel directories simultaneously
Product: Red Hat Gluster Storage Reporter: Nag Pavan Chilakam <nchilaka>
Component: disperseAssignee: Sunil Kumar Acharya <sheggodu>
Status: CLOSED UPSTREAM QA Contact: Nag Pavan Chilakam <nchilaka>
Severity: medium Docs Contact:
Priority: high    
Version: rhgs-3.2CC: aspandey, pkarampu, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: FutureFeature, ZStream
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: 2018-11-28 16:48:55 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:

Description Nag Pavan Chilakam 2016-11-15 11:36:51 UTC
Description of problem:
======================
Suppose I have set mtsh option to say 10 in a 4+2 ec volume
I bring down one brick
Now i create 3 dirs say dir1,dir2,dir3
In each i create 3 files f1..f3 so totalling 9 files

Once brick is brought up I expect mtsh to pick all 9 files parallel for healing as i set option to 10
However only one directory is chosen at a time.

Hence the mtsh value propostiion is not brought in when we have lot of dirs and less files in each dir pending for heal

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

Comment 2 Pranith Kumar K 2016-11-15 15:09:18 UTC
Nice testing Nag!!

This is a trade off. Without the files getting created the files can't be healed. So directory heal has to happen before files inside it can be picked up. It is not obvious that we can heal all the directories in parallel because we don't know whether the directories are at the same level or not at the moment(We can enhance this as well if we *really* want to). So the only parallelization that we can do without extra work is to trigger heal for a file under the directory as soon as the entry inside the directory is healed. Which I can address as part of this bug sometime in future as an enhancement. In general we have more files than directories so we won't be severely affected by the existing trade off.