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

Remove *synchronous* calls from the *single-threaded* C clieant API, since they are documented not to work

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.1.1, 3.2.2
    • 3.5.3, 3.6.0
    • c client
    • RHEL 4u8 (Linux). The issue is not OS-specific though.

    • Removed synchronous calls from the single-threaded API as they are not implemented and documented as such.

    Description

      Since the synchronous calls are known to be unimplemented in the single threaded version of the client library libzookeeper_st.so, I believe that it would be helpful towards users of the library if that information was also obvious from the header file.

      Anecdotally more than one of us here made the mistake of starting by using the synchronous calls with the single-threaded library, and we found ourselves debugging it. An early warning would have been greatly appreciated.

      1. Could you please add warnings to the doxygen blocks of all synchronous calls saying that they are not available in the single-threaded API. This cannot be safely done with #ifdef THREADED, obviously, because the same header file is included whichever client library implementation one is compiling for.

      2. Could you please bracket the implementation of all synchronous calls in zookeeper.c with #ifdef THREADED and #endif, so that those symbols are not present in libzookeeper_st.so?

      Attachments

        1. fix-sync-apis-in-st-adaptor.v2.patch
          7 kB
          Pierre Habouzit
        2. fix-sync-apis-in-st-adaptor.patch
          6 kB
          Pierre Habouzit

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            breed Benjamin Reed
            jhatala Jozef Hatala
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m

                Slack

                  Issue deployment