[Bugs] [Bug 1271325] RFE: use code generation for repetitive stuff
bugzilla at redhat.com
bugzilla at redhat.com
Fri Oct 23 05:51:49 UTC 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1271325
--- Comment #3 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/9411 committed in master by Vijay Bellur
(vbellur at redhat.com)
------
commit fb2a511493868a9ff0c2926537a4d1d23821ce38
Author: Jeff Darcy <jdarcy at redhat.com>
Date: Tue Oct 6 13:19:01 2015 -0400
libglusterfs: replace default functions with generated versions
Replacing repetitive code like this with code generated from a more
compact "canonical" definition carries several advantages.
* Ease the process of adding new fops (e.g. GF_FOP_IPC).
* Ease the process of making global changes to existing fops (e.g.
adding "xdata").
* Ensure strict consistency between all of the pieces that must be
compatible with each other, through both kinds of changes.
What we have right now is just a start. The above benefits will only
truly be realized when we use the same definitions to generate stubs,
syncops, and perhaps even parts of gfapi or glupy.
This same infrastructure can also be used to reduce code duplication and
potential for error in many of our translators. NSR already uses a
similar technique, using a few hundred lines of templates to generate a
few *thousand* lines of code. The ability to make a global "aspect"
change (e.g. to quorum checking) in one place instead of seventy has
already been demonstrated there.
Other candidates for code generation include the AFR/EC transaction
infrastructure, or stub creation/resumption in io-threads.
Change-Id: If7d59de7a088848b557f5aea00741b4fe19017c1
BUG: 1271325
Signed-off-by: Jeff Darcy <jdarcy at redhat.com>
Reviewed-on: http://review.gluster.org/9411
Tested-by: Gluster Build System <jenkins at build.gluster.com>
Tested-by: NetBSD Build System <jenkins at build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana at redhat.com>
Reviewed-by: Vijay Bellur <vbellur at redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=bsWejMK2g6&a=cc_unsubscribe
More information about the Bugs
mailing list