hadoop-glusterfs: Fix IndexOutOfBounds Exception
Fix IndexOutOfBounds Exception which is hit when one of the replica pair is down. Problematic code existed in assuming a uniform size for each replica in pathinfo string. Change-Id: I85377ba5549e0603fe86e8d787115004f50e0c6a BUG: 808009 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/3087 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: M S Vishwanath Bhat <vishwanath@gluster.com> Reviewed-by: M S Vishwanath Bhat <vishwanath@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
This commit is contained in:
parent
f132cc666b
commit
7768d700a1
@ -327,7 +327,6 @@ public class GlusterFSXattr {
|
||||
}
|
||||
}
|
||||
|
||||
rsize = replicas.get(0).size();
|
||||
stripeSize = meta.get("block-size");
|
||||
|
||||
nrAllocs = (int) (((len - start) / stripeSize) + 1);
|
||||
@ -350,6 +349,8 @@ public class GlusterFSXattr {
|
||||
done = true;
|
||||
}
|
||||
|
||||
rsize = replicas.get(counter).size();
|
||||
|
||||
if (hnts == null)
|
||||
repl[allocCtr] = new GlusterFSBrickRepl(rsize, stripeStart, (stripeEnd - stripeStart));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user