From 8e0ae12b4ec52f5b1fc23cff89ec04bbfb022d3e Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 10 Jul 2018 16:43:01 +0300 Subject: [PATCH] Miscellaneous [#CLICKHOUSE-2] --- dbms/src/Common/ZooKeeper/KeeperException.h | 2 +- dbms/src/Common/ZooKeeper/ZooKeeper.cpp | 4 ++-- dbms/src/DataStreams/AddingDefaultBlockOutputStream.cpp | 1 + dbms/src/DataStreams/AddingDefaultBlockOutputStream.h | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbms/src/Common/ZooKeeper/KeeperException.h b/dbms/src/Common/ZooKeeper/KeeperException.h index 9afe8d46873..fe6c7aedeff 100644 --- a/dbms/src/Common/ZooKeeper/KeeperException.h +++ b/dbms/src/Common/ZooKeeper/KeeperException.h @@ -47,7 +47,7 @@ public: KeeperMultiException(int32_t code, const Requests & requests, const Responses & responses); private: - size_t getFailedOpIndex(int32_t code, const Responses & responses) const; + static size_t getFailedOpIndex(int32_t code, const Responses & responses); }; }; diff --git a/dbms/src/Common/ZooKeeper/ZooKeeper.cpp b/dbms/src/Common/ZooKeeper/ZooKeeper.cpp index f7c532e966a..cbb0585253d 100644 --- a/dbms/src/Common/ZooKeeper/ZooKeeper.cpp +++ b/dbms/src/Common/ZooKeeper/ZooKeeper.cpp @@ -815,7 +815,7 @@ int32_t ZooKeeper::tryMultiNoThrow(const Requests & requests, Responses & respon } -size_t KeeperMultiException::getFailedOpIndex(int32_t code, const Responses & responses) const +size_t KeeperMultiException::getFailedOpIndex(int32_t code, const Responses & responses) { if (responses.empty()) throw DB::Exception("Responses for multi transaction is empty", DB::ErrorCodes::LOGICAL_ERROR); @@ -838,10 +838,10 @@ KeeperMultiException::KeeperMultiException(int32_t code, const Requests & reques { } + std::string KeeperMultiException::getPathForFirstFailedOp() const { return requests[failed_op_index]->getPath(); - } void KeeperMultiException::check(int32_t code, const Requests & requests, const Responses & responses) diff --git a/dbms/src/DataStreams/AddingDefaultBlockOutputStream.cpp b/dbms/src/DataStreams/AddingDefaultBlockOutputStream.cpp index a43dfab6e13..fe773b40776 100644 --- a/dbms/src/DataStreams/AddingDefaultBlockOutputStream.cpp +++ b/dbms/src/DataStreams/AddingDefaultBlockOutputStream.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include diff --git a/dbms/src/DataStreams/AddingDefaultBlockOutputStream.h b/dbms/src/DataStreams/AddingDefaultBlockOutputStream.h index 06daf5532df..b36aaee501f 100644 --- a/dbms/src/DataStreams/AddingDefaultBlockOutputStream.h +++ b/dbms/src/DataStreams/AddingDefaultBlockOutputStream.h @@ -4,7 +4,6 @@ #include #include #include -#include namespace DB