Description
C client build is broken after ZOOKEEPER-2628 is merged in. After a little debug, I find out that the build is broken because the zookeeper.jute.h and zookeeper.jute.c are not completely generated.
- The culprit is the code change introduced in
ZOOKEEPER-2628, where we wrapsJRecord.genCCode
with a try / catch / finally block and the file writers were prematurely closed in finally block which prevents remaining of the zookeeper.jute.h/c file being generated.
- The fix to
JRecord.genCCode
in
ZOOKEEPER-2628was made because a find bug warning was directly associated with the code. Due to the subtlety of the file writer ownership, we did not capture the issue during code review.
- The build break was not captured in pre-commit builds as well (an example), where we get all tests passed including C client tests. I suspect we might have another bug with cached generated files that should be regenerated but we don't - need more investigation on this one.
- The fix is simple by revert the change to this specific method. Findbug does not complain anymore because the previous warning that appertain to this code block was fixed at the call site of
JRecord.genCCode
. So by reverting the change we still have zero find bug warnings.
Attachments
Issue Links
- is broken by
-
ZOOKEEPER-2628 Investigate and fix findbug warnings
- Closed
- links to