Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2636

Fix C build break.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.5.3
    • 3.5.3, 3.6.0
    • jute
    • None

    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 wraps
        JRecord.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-2628 was 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

          Activity

            People

              hanm Michael Han
              hanm Michael Han
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: