[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15694257#comment-15694257
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2636:
-------------------------------------------

GitHub user hanm opened a pull request:

    https://github.com/apache/zookeeper/pull/115

    ZOOKEEPER-2636: Fix C client build break.

    JIRA: https://issues.apache.org/jira/browse/ZOOKEEPER-2636
    
    Fix build break by reverting the changes made to JRecord.genCCode in 
ZOOKEEPER-2686, which prematurely closed the file writers that prevents 
zookeeper.jute.h and zookeeper.jute.c files from complete generation.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hanm/zookeeper ZOOKEEPER-2636

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/115.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #115
    
----
commit 8b2df1dca353946cd265c217e4010d3f080943ba
Author: Michael Han <h...@cloudera.com>
Date:   2016-11-24T21:32:16Z

    Fix C client build break caused by ZOOKEEPER-2628.

----


> Fix C build break.
> ------------------
>
>                 Key: ZOOKEEPER-2636
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2636
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: jute
>    Affects Versions: 3.5.3
>            Reporter: Michael Han
>            Assignee: Michael Han
>            Priority: Blocker
>             Fix For: 3.5.3, 3.6.0
>
>
> 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 wraps 
> {code}JRecord.genCCode{code} 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. 
> * This fix is 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|https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/72//console]),
>  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 {code}JRecord.genCCode{code}. So by 
> reverting the change we still have zero find bug warnings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to