mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
1c4659b8e7
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
36 lines
1003 B
C++
36 lines
1003 B
C++
#pragma once
|
|
|
|
namespace Poco
|
|
{
|
|
class Logger;
|
|
}
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct DistributedAsyncInsertHeader;
|
|
class ReadBufferFromFile;
|
|
class RemoteInserter;
|
|
|
|
/// 'remote_error' argument is used to decide whether some errors should be
|
|
/// ignored or not, in particular:
|
|
///
|
|
/// - ATTEMPT_TO_READ_AFTER_EOF should not be ignored
|
|
/// if we receive it from remote (receiver), since:
|
|
/// - the sender will got ATTEMPT_TO_READ_AFTER_EOF when the client just go away,
|
|
/// i.e. server had been restarted
|
|
/// - since #18853 the file will be checked on the sender locally, and
|
|
/// if there is something wrong with the file itself, we will receive
|
|
/// ATTEMPT_TO_READ_AFTER_EOF not from the remote at first
|
|
/// and mark batch as broken.
|
|
bool isDistributedSendBroken(int code, bool remote_error);
|
|
|
|
void writeRemoteConvert(
|
|
const DistributedAsyncInsertHeader & distributed_header,
|
|
RemoteInserter & remote,
|
|
bool compression_expected,
|
|
ReadBufferFromFile & in,
|
|
Poco::Logger * log);
|
|
|
|
}
|