Bug 1622549 - libgfchangelog: History API fails
Summary: libgfchangelog: History API fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: changelog
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kotresh HR
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1627639 1630141
TreeView+ depends on / blocked
 
Reported: 2018-08-27 12:47 UTC by Kotresh HR
Modified: 2018-10-23 15:18 UTC (History)
2 users (show)

Fixed In Version: glusterfs-5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1627639 1630141 (view as bug list)
Environment:
Last Closed: 2018-10-23 15:18:02 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Sample C program which call history API (1.74 KB, text/x-csrc)
2018-08-27 12:47 UTC, Kotresh HR
no flags Details
Header file for the C program (2.95 KB, text/x-csrc)
2018-08-27 12:56 UTC, Kotresh HR
no flags Details

Description Kotresh HR 2018-08-27 12:47:26 UTC
Created attachment 1478943 [details]
Sample C program which call history API

Description of problem:
If requested start time and end time doesn't fall into
first HTIME file, then history API fails even though
continuous changelogs are avaiable for the requested range
in other HTIME files. This is induced by changelog disable
and enable which creates fresh HTIME index file.


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

How reproducible:
Always

Steps to Reproduce:
1. Setup gluster volume and let the I/O happen
2. Enable changelog
3. sleep for some time
4. Disable changelog
5. sleep for sometime
6. Enable changelog
7. Use the sample c program attached to query history API with start time after step 6



Actual results:
History fails

Expected results:
History API should not fail if continuous changelogs are available even if it's second HTIME file.

Additional info:

Comment 1 Kotresh HR 2018-08-27 12:56:06 UTC
Created attachment 1478945 [details]
Header file for the C program

Steps to run the program.

1. Place both header file and C program attached in a directory
2. Compile
      gcc -o get-history get-history.c -lgfchangelog
3. Run
      get-history <start-time> <end-time>

Comment 2 Worker Ant 2018-08-27 13:18:10 UTC
REVIEW: https://review.gluster.org/21016 (libgfchangelog: Fix history changelog) posted (#1) for review on master by Kotresh HR

Comment 3 Worker Ant 2018-08-31 13:29:16 UTC
COMMIT: https://review.gluster.org/21016 committed in master by "Amar Tumballi" <amarts> with a commit message- libgfchangelog: Fix changelog history API

Problem:
If requested start time and end time doesn't fall into
first HTIME file, then history API fails even though
continuous changelogs are avaiable for the requested range
in other HTIME files. This is induced by changelog disable
and enable which creates fresh HTIME index file.

Cause and Analysis:
Each HTIME index file represents the availability of
continuous changelogs. If changelog is disabled and enabled,
a new HTIME index file is created represents non availability
of continuous changelogs. So as long as the requested start
and end falls into single HTIME index file and not across,
history API should succeed.

But History API checks for the changelogs only in first
HTIME index file and errors out if not available.

Fix:
Check in all HTIME index files for availability of continuous
changelogs for requested change.

fixes: bz#1622549
Change-Id: I80eeceb5afbd1b89f86a9dc4c320e161907d3559
Signed-off-by: Kotresh HR <khiremat>

Comment 4 Shyamsundar 2018-10-23 15:18:02 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/


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