Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0AE8E200C02 for ; Fri, 16 Dec 2016 00:04:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 09750160B30; Thu, 15 Dec 2016 23:04:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5AB18160B15 for ; Fri, 16 Dec 2016 00:04:02 +0100 (CET) Received: (qmail 35730 invoked by uid 500); 15 Dec 2016 23:04:00 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 35586 invoked by uid 99); 15 Dec 2016 23:04:00 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 23:04:00 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BCC732C03E2 for ; Thu, 15 Dec 2016 23:04:00 +0000 (UTC) Date: Thu, 15 Dec 2016 23:04:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-761) Remove *synchronous* calls from the *single-threaded* C clieant API, since they are documented not to work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 15 Dec 2016 23:04:03 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752784#comment-15752784 ] ASF GitHub Bot commented on ZOOKEEPER-761: ------------------------------------------ Github user breed commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/90#discussion_r92719995 --- Diff: src/c/tests/TestClient.cc --- @@ -47,6 +47,10 @@ struct buff_struct_2 { char *buffer; }; +// TODO(br33d): the vast majority of this test is not usable with single threaded. --- End diff -- it's more a matter of implementing the tests than refactoring :) > Remove *synchronous* calls from the *single-threaded* C clieant API, since they are documented not to work > ---------------------------------------------------------------------------------------------------------- > > Key: ZOOKEEPER-761 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-761 > Project: ZooKeeper > Issue Type: Improvement > Components: c client > Affects Versions: 3.1.1, 3.2.2 > Environment: RHEL 4u8 (Linux). The issue is not OS-specific though. > Reporter: Jozef Hatala > Assignee: Benjamin Reed > Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: fix-sync-apis-in-st-adaptor.patch, fix-sync-apis-in-st-adaptor.v2.patch > > > Since the synchronous calls are [known|http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#Using+the+C+Client] 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? -- This message was sent by Atlassian JIRA (v6.3.4#6332)