kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [3/4] incubator-kudu git commit: Mark the Response accessors in transactions/transaction's state const
Date Wed, 22 Jun 2016 01:54:23 GMT
Mark the Response accessors in transactions/transaction's state const

There is no reason why these accessors should't be const and by making
them as such we can access the response through state(), instead of
mutable_state().

Change-Id: I7dbcc4bf8fc657a80f08806ce5e016601ef429bc
Reviewed-on: http://gerrit.cloudera.org:8080/3419
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


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

Branch: refs/heads/master
Commit: 3bfe7127778f7a855c3599c3cf58439140edbdc9
Parents: 021658d
Author: David Alves <david.alves@cloudera.com>
Authored: Mon Jun 20 21:48:23 2016 -0700
Committer: David Ribeiro Alves <dralves@apache.org>
Committed: Tue Jun 21 18:17:40 2016 +0000

----------------------------------------------------------------------
 src/kudu/tablet/transactions/alter_schema_transaction.h | 2 +-
 src/kudu/tablet/transactions/transaction.h              | 2 +-
 src/kudu/tablet/transactions/write_transaction.h        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/3bfe7127/src/kudu/tablet/transactions/alter_schema_transaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/alter_schema_transaction.h b/src/kudu/tablet/transactions/alter_schema_transaction.h
index 744097d..cfcae3f 100644
--- a/src/kudu/tablet/transactions/alter_schema_transaction.h
+++ b/src/kudu/tablet/transactions/alter_schema_transaction.h
@@ -52,7 +52,7 @@ class AlterSchemaTransactionState : public TransactionState {
   }
 
   const tserver::AlterSchemaRequestPB* request() const OVERRIDE { return request_; }
-  tserver::AlterSchemaResponsePB* response() OVERRIDE { return response_; }
+  tserver::AlterSchemaResponsePB* response() const OVERRIDE { return response_; }
 
   void set_schema(const Schema* schema) { schema_ = schema; }
   const Schema* schema() const { return schema_; }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/3bfe7127/src/kudu/tablet/transactions/transaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/transaction.h b/src/kudu/tablet/transactions/transaction.h
index 2a10f23..0a133f5 100644
--- a/src/kudu/tablet/transactions/transaction.h
+++ b/src/kudu/tablet/transactions/transaction.h
@@ -135,7 +135,7 @@ class TransactionState {
 
   // Returns the response PB associated with this transaction, or NULL.
   // This will only return a non-null object for leader-side transactions.
-  virtual google::protobuf::Message* response() { return NULL; }
+  virtual google::protobuf::Message* response() const { return NULL; }
 
   // Sets the ConsensusRound for this transaction, if this transaction is
   // being executed through the consensus system.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/3bfe7127/src/kudu/tablet/transactions/write_transaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/transactions/write_transaction.h b/src/kudu/tablet/transactions/write_transaction.h
index 162d6b4..134c04b 100644
--- a/src/kudu/tablet/transactions/write_transaction.h
+++ b/src/kudu/tablet/transactions/write_transaction.h
@@ -94,7 +94,7 @@ class WriteTransactionState : public TransactionState {
 
   // Returns the prepared response to the client that will be sent when this
   // transaction is completed, if this transaction was started by a client.
-  tserver::WriteResponsePB *response() OVERRIDE {
+  tserver::WriteResponsePB *response() const OVERRIDE {
     return response_;
   }
 


Mime
View raw message