Bug 972459 - heal info split-brain not printing split-brain files, if files count is less that 1024.
heal info split-brain not printing split-brain files, if files count is less ...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: libglusterfsclient (Show other bugs)
pre-release
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: vsomyaju
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-09 11:10 EDT by vsomyaju
Modified: 2015-03-04 19:06 EST (History)
2 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:20:48 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 vsomyaju 2013-06-09 11:10:59 EDT
Description of problem:
gluster volume heal volume-name info split-brain command do not list any file
if file count is less that 1024.

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


How reproducible:
always

Steps to Reproduce:
1. create a replicate volume with 2 bricks.
2. create 10 split-brain files.
3. Execute gluster volume heal volumename info split-brain

Actual results:
No of files are always shown 0.

Expected results:
Should print all the files in split-brain

Additional info:
Currently values from the history buffer are always taken from current index to either (
1.buffer_lenth_used) or  
2.(end of the buffer and then from start of the buffer upto current index) 
to follow LIFO. 
But it may happen that number of entries are less that 1024. In that case current index and buffer_length_used are equal and it will nerver take any entry from buffer.
Comment 1 Anand Avati 2013-06-09 12:11:38 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#1) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 2 Anand Avati 2013-06-09 12:25:49 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#2) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 3 Anand Avati 2013-06-09 12:32:36 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#3) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 4 Anand Avati 2013-06-10 04:38:18 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#4) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 5 Anand Avati 2013-06-10 04:39:51 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#5) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 6 Anand Avati 2013-06-10 06:28:38 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#6) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 7 Anand Avati 2013-06-12 07:31:21 EDT
REVIEW: http://review.gluster.org/5197 (libglusterfs: Fix circular buffer to dump entries if count is less than 1024) posted (#7) for review on master by venkatesh somyajulu (vsomyaju@redhat.com)
Comment 8 Anand Avati 2013-06-13 21:30:57 EDT
COMMIT: http://review.gluster.org/5197 committed in master by Anand Avati (avati@redhat.com) 
------
commit 77e6caa440fb27d97fc9c6330c3598763c2351f5
Author: Venkatesh Somyajulu <vsomyaju@redhat.com>
Date:   Wed Jun 12 16:59:13 2013 +0530

    libglusterfs: Fix circular buffer to dump entries if count is less than 1024
    
    Problem:
    To dump the values present in the circular buffer, index always
    moves from current index to used_len. But if circular buffer is not
    completely filled even once then next index to be filled  and used length
    value are always same which means it will never dump any value.
    
    Fix: Modified the logic of buffer traversing to dump values so that  it
    will still maintain FIFO and cover both the cases where buffer is either
    partially filled or being used more than once.
    
    Change-Id: If73a5e481cca1751d57aba1136c2d25d23ce073c
    BUG: 972459
    Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
    Reviewed-on: http://review.gluster.org/5197
    Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>

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