kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject kudu git commit: KuduSession: do not advertise thread-safety
Date Wed, 24 Aug 2016 19:21:01 GMT
Repository: kudu
Updated Branches:
  refs/heads/master c1aecf217 -> 2976b2a2c


KuduSession: do not advertise thread-safety

Do not advertise thread-safety of KuduSession methods for the
Kudu C++ client, even if they are thread-safe de facto.  This is
to have one set of semantics for both C++ and Java Kudu client
libraries (corresponding methods of the Java client are not
thread-safe).  Besides, current use cases for the Kudu client
assume that operations with KuduSession object do not involve
multiple threads.

Change-Id: I6b3fcbd0d6446ccddce7a1812260c692eba18fcd
Reviewed-on: http://gerrit.cloudera.org:8080/4105
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <dan@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/2976b2a2
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/2976b2a2
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/2976b2a2

Branch: refs/heads/master
Commit: 2976b2a2c14a70e28b44ceed92742fd9913284df
Parents: c1aecf2
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Tue Aug 23 17:40:52 2016 -0700
Committer: Dan Burkert <dan@cloudera.com>
Committed: Wed Aug 24 19:20:49 2016 +0000

----------------------------------------------------------------------
 docs/release_notes.adoc  |  3 +++
 src/kudu/client/client.h | 14 +-------------
 2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2976b2a2/docs/release_notes.adoc
----------------------------------------------------------------------
diff --git a/docs/release_notes.adoc b/docs/release_notes.adoc
index 8279384..38c3d7a 100644
--- a/docs/release_notes.adoc
+++ b/docs/release_notes.adoc
@@ -43,6 +43,9 @@ detailed below.
 - The `kudu-pbc-dump` tool has been removed. The same functionality is now
   implemented as `kudu pbc dump`.
 
+- KuduSession methods in the C++ library are no longer advertised as thread-safe
+  to have one set of semantics for both C++ and Java Kudu client libraries.
+
 [[rn_0.10.0]]
 == Release notes specific to 0.10.0
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/2976b2a2/src/kudu/client/client.h
----------------------------------------------------------------------
diff --git a/src/kudu/client/client.h b/src/kudu/client/client.h
index dbd0f6b..89e5a40 100644
--- a/src/kudu/client/client.h
+++ b/src/kudu/client/client.h
@@ -1008,7 +1008,7 @@ class KUDU_EXPORT KuduError {
 /// Users who are familiar with the Hibernate ORM framework should find this
 /// concept of a Session familiar.
 ///
-/// @note This class is not thread-safe except where otherwise specified.
+/// @note This class is not thread-safe.
 class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession> {
  public:
   ~KuduSession();
@@ -1143,8 +1143,6 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   /// the write_op is malformed, the write_op is stored in the session's error
   /// collector which may be retrieved at any time.
   ///
-  /// @note This method is thread safe.
-  ///
   /// @param [in] write_op
   ///   Operation to apply. This method transfers the write_op's ownership
   ///   to the KuduSession.
@@ -1173,8 +1171,6 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   /// In @c AUTO_FLUSH_SYNC mode, this has no effect, since every Apply() call
   /// flushes itself inline.
   ///
-  /// @note This function is thread-safe.
-  ///
   /// @return Operation result status. In particular, returns a non-OK status
   ///   if there are any pending errors after the rows have been flushed.
   ///   Callers should then use GetPendingErrors to determine which specific
@@ -1226,8 +1222,6 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
 
   /// Check if there are any pending operations in this session.
   ///
-  /// @note This function is thread-safe.
-  ///
   /// @return @c true if there are operations which have not yet been delivered
   ///   to the cluster. This may include buffered operations (i.e. those
   ///   that have not yet been flushed) as well as in-flight operations
@@ -1245,8 +1239,6 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   /// In the other flush modes, data is immediately put en-route
   /// to the destination, so this will return 0.
   ///
-  /// @note This function is thread-safe.
-  ///
   /// @return The number of buffered operations. These are operations that have
   ///   not yet been flushed -- i.e. they are not en-route yet.
   int CountBufferedOperations() const;
@@ -1256,8 +1248,6 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   /// Errors may accumulate in session's lifetime; use this method to
   /// see how many errors happened since last call of GetPendingErrors() method.
   ///
-  /// @note This function is thread-safe.
-  ///
   /// @return Total count of errors accumulated during the session.
   int CountPendingErrors() const;
 
@@ -1271,8 +1261,6 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession>
   /// @param [out] overflowed
   ///   If there were more errors than could be held in the session's error
   ///   storage, then @c overflowed is set to @c true.
-  ///
-  /// @note This function is thread-safe.
   void GetPendingErrors(std::vector<KuduError*>* errors, bool* overflowed);
 
   /// @return Client for the session: pointer to the associated client object.


Mime
View raw message