Repository: kudu Updated Branches: refs/heads/master 0c44223ea -> 8613415b2
[client.h] CountBufferedOperations marked as deprecated KuduSession::CountBufferedOperations() is used only by tests now. Also, the only flush mode to use this method consistently is MANUAL_FLUSH mode, but in that mode it's easy to count for number of buffered operations by a different means -- that's the count of Apply() calls since last KuduSession::Flush() call (or invocation of the callback passed into KuduSession::FlushAsync() method). Change-Id: If6293c0a3058f7056d24e7cee0120d1852ded548 Reviewed-on: http://gerrit.cloudera.org:8080/4723 Tested-by: Kudu Jenkins Reviewed-by: Jean-Daniel Cryans <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/8613415b Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/8613415b Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/8613415b Branch: refs/heads/master Commit: 8613415b2eafd5457a68a91c1c0e22b96e8c6f1d Parents: 0c44223 Author: Alexey Serbin <[email protected]> Authored: Thu Oct 13 16:17:01 2016 -0700 Committer: Jean-Daniel Cryans <[email protected]> Committed: Mon Oct 17 22:16:06 2016 +0000 ---------------------------------------------------------------------- src/kudu/client/client.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/8613415b/src/kudu/client/client.h ---------------------------------------------------------------------- diff --git a/src/kudu/client/client.h b/src/kudu/client/client.h index 1a113e8..a46322e 100644 --- a/src/kudu/client/client.h +++ b/src/kudu/client/client.h @@ -1479,14 +1479,26 @@ class KUDU_EXPORT KuduSession : public sp::enable_shared_from_this<KuduSession> /// /// Note that this is different than HasPendingOperations() above, /// which includes operations which have been sent and not yet responded to. - /// This is only relevant in @c MANUAL_FLUSH mode, where the result will not - /// decrease except for after a manual flush, after which point it will be 0. - /// In the other flush modes, data is immediately put en-route - /// to the destination, so this will return 0. + /// + /// This method is most relevant in @c MANUAL_FLUSH mode, where + /// the result count stays valid until next explicit flush or Apply() call. + /// There is not much sense using this method in other flush modes: + /// @li in @c AUTO_FLUSH_SYNC mode, the data is immediately put en-route + /// to the destination by Apply() method itself, so this method always + /// returns zero. + /// @li in @c AUTO_FLUSH_BACKGROUND mode, the result count returned by + /// this method expires unpredictably and there isn't any guaranteed + /// validity interval for the result: the background flush task can run + /// any moment, invalidating the result. + /// + /// @deprecated This method is experimental and will disappear + /// in a future release. /// /// @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; + int CountBufferedOperations() const + ATTRIBUTE_DEPRECATED("this method is experimental and will disappear " + "in a future release"); /// Get error count for pending operations. ///
