mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Do not check writeRetry errors in OwnSplitChannel
Should fix PVS warning: "There are identical sub-expressions '!writeRetry(2, "\n")' to the left and to the right of the '||' operator."
This commit is contained in:
parent
38c7056ecc
commit
c65ae8ac31
@ -61,15 +61,12 @@ void OwnSplitChannel::tryLogSplit(const Poco::Message & msg)
|
||||
const std::string & exception_message = getCurrentExceptionMessage(true);
|
||||
const std::string & message = msg.getText();
|
||||
|
||||
if (!writeRetry(STDERR_FILENO, "Cannot add message to the log: ") ||
|
||||
!writeRetry(STDERR_FILENO, message.data(), message.size()) ||
|
||||
!writeRetry(STDERR_FILENO, "\n") ||
|
||||
!writeRetry(STDERR_FILENO, exception_message.data(), exception_message.size()) ||
|
||||
!writeRetry(STDERR_FILENO, "\n")
|
||||
)
|
||||
{
|
||||
/// Nothing can be done. Ignore the error.
|
||||
}
|
||||
/// NOTE: errors are ignored, since nothing can be done.
|
||||
writeRetry(STDERR_FILENO, "Cannot add message to the log: ");
|
||||
writeRetry(STDERR_FILENO, message.data(), message.size());
|
||||
writeRetry(STDERR_FILENO, "\n");
|
||||
writeRetry(STDERR_FILENO, exception_message.data(), exception_message.size());
|
||||
writeRetry(STDERR_FILENO, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user