mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fixed for using failed_op_index before it is initialized
This commit is contained in:
parent
827ae49b95
commit
d3edcaae04
@ -24,6 +24,9 @@ public:
|
|||||||
static void check(Coordination::Error code, const Coordination::Requests & requests, const Coordination::Responses & responses);
|
static void check(Coordination::Error code, const Coordination::Requests & requests, const Coordination::Responses & responses);
|
||||||
|
|
||||||
KeeperMultiException(Coordination::Error code, const Coordination::Requests & requests, const Coordination::Responses & responses);
|
KeeperMultiException(Coordination::Error code, const Coordination::Requests & requests, const Coordination::Responses & responses);
|
||||||
|
|
||||||
|
private:
|
||||||
|
KeeperMultiException(Coordination::Error code, size_t failed_op_index_, const Coordination::Requests & requests_, const Coordination::Responses & responses_);
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t getFailedOpIndex(Coordination::Error code, const Coordination::Responses & responses);
|
size_t getFailedOpIndex(Coordination::Error code, const Coordination::Responses & responses);
|
||||||
|
@ -1264,13 +1264,18 @@ size_t getFailedOpIndex(Coordination::Error exception_code, const Coordination::
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
KeeperMultiException::KeeperMultiException(Coordination::Error exception_code, const Coordination::Requests & requests_, const Coordination::Responses & responses_)
|
KeeperMultiException::KeeperMultiException(Coordination::Error exception_code, size_t failed_op_index_, const Coordination::Requests & requests_, const Coordination::Responses & responses_)
|
||||||
: KeeperException(exception_code, "Transaction failed: Op #{}, path", failed_op_index),
|
: KeeperException(exception_code, "Transaction failed: Op #{}, path", failed_op_index_),
|
||||||
requests(requests_), responses(responses_), failed_op_index(getFailedOpIndex(exception_code, responses))
|
requests(requests_), responses(responses_), failed_op_index(failed_op_index_)
|
||||||
{
|
{
|
||||||
addMessage(getPathForFirstFailedOp());
|
addMessage(getPathForFirstFailedOp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeeperMultiException::KeeperMultiException(Coordination::Error exception_code, const Coordination::Requests & requests_, const Coordination::Responses & responses_)
|
||||||
|
: KeeperMultiException(exception_code, getFailedOpIndex(exception_code, responses_), requests_, responses_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string KeeperMultiException::getPathForFirstFailedOp() const
|
std::string KeeperMultiException::getPathForFirstFailedOp() const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user