Bug 1495153 - xlator_t structure's 'client_latency' variable is not used
Summary: xlator_t structure's 'client_latency' variable is not used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: mainline
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Sven
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-25 10:27 UTC by Amar Tumballi
Modified: 2018-06-20 17:57 UTC (History)
4 users (show)

Fixed In Version: glusterfs-v4.1.0
Clone Of:
Environment:
Last Closed: 2018-06-20 17:57:11 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Amar Tumballi 2017-09-25 10:27:06 UTC
Description of problem:
Unused variable, ie, the variable gets assigned, but never gets used later.

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

How reproducible:
Look at the code in `rpc/rpc-lib/src/rpc-clnt-ping.c:208`


Good for someone to check and analyse whether its required or not.

Comment 1 Sven 2018-03-10 22:50:34 UTC
member 'client_latency' was added by

commit 07cc8679cdf3b29680f4f105d0222da168d8bfc1
Author: Kevin Vigor <kvigor>
Date:   Tue Mar 21 08:23:25 2017 -0700

    Halo Replication feature for AFR translator
...

and was never used since then. IMHO it can be removed.

Amar, what else do you need from me in that regard? Thanks, Sven

Comment 2 Sven 2018-03-16 08:35:16 UTC
Niels, may you advise how we can proceed in that regard? Thanks a lot, Sven

Comment 3 Niels de Vos 2018-03-16 13:23:50 UTC
(In reply to Sven from comment #2)
> Niels, may you advise how we can proceed in that regard? Thanks a lot, Sven

If the client_latency really is not used, all references can be removed from the code. Possibly even the whole 'struct ping_local'?

Resurrecting removed code is easy. And surely anyone that wants to implement something useful with the (struct ping_local*)->client_latency will be able to add it again.

Because it is part of the 'rpc' component, setting that in this bug should get the attention of the developers working on it too.

Comment 4 Sven 2018-03-16 20:51:00 UTC
Great, then please assign it to me. Thanks, Sven

Comment 5 Worker Ant 2018-03-17 22:42:48 UTC
REVIEW: https://review.gluster.org/19733 (cleanup: xlator_t structure's 'client_latency' variable is not used) posted (#1) for review on master by

Comment 6 Worker Ant 2018-03-19 03:30:58 UTC
COMMIT: https://review.gluster.org/19733 committed in master by "Raghavendra G" <rgowdapp> with a commit message- cleanup: xlator_t structure's 'client_latency' variable is not used

  - Removed unused struct member and its one time usage.
  - cleaned up wrong white space

member 'client_latency' was not used otherwise since it was added by

commit 07cc8679cdf3b29680f4f105d0222da168d8bfc1
Author: Kevin Vigor <kvigor>
Date:   Tue Mar 21 08:23:25 2017 -0700

    Halo Replication feature for AFR translator

Change-Id: Ibb0ea828d4090bbe8897f6af326b317884162a00
BUG: 1495153
Signed-off-by: Sven Fischer <sven>

Comment 7 Shyamsundar 2018-06-20 17:57:11 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-v4.1.0, please open a new bug report.

glusterfs-v4.1.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] http://lists.gluster.org/pipermail/announce/2018-June/000102.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.