ClickHouse/dbms/src/Storages/Distributed
Azat Khuzhin 3a72e1c12a Add checksum for extra info/query in distributed sends
This extras includes:
- server revision
- query settings
- query

Otherwise the code can try to interpret data, and got for instance
std::length_error exception, which is not catched (to mark the part as
broken). Also this will protect from the corruptions on disk.

And add a simple test, since dbms/tests/integration/test_insert_into_distributed too complex.

Also simplify the code by using readStringBinary() over
readVarUInt()+b.readStrict() (this also gains additional checks that
string is not bigger then 1GB).

Refs: #4852 (8ef7f3589a)
v2: avoid ABI breakage (suggested by @vitlibar)
v3: minor code fixes (suggested by @vitlibar) and as a consequence clang-8 build fix
v4: drop DBMS_MIN_REVISION_WITH_EXTRAS_CHECKSUM_IN_DIST_BATCH and also
    revert some renames to make the patch cleaner
2019-12-04 22:54:38 +03:00
..
DirectoryMonitor.cpp Add checksum for extra info/query in distributed sends 2019-12-04 22:54:38 +03:00
DirectoryMonitor.h Introduce distributed_directory_monitor_max_sleep_time_ms setting 2019-09-12 03:16:06 +03:00
DistributedBlockOutputStream.cpp Add checksum for extra info/query in distributed sends 2019-12-04 22:54:38 +03:00
DistributedBlockOutputStream.h Include PODArray.h into fewer files. 2019-10-11 14:28:16 +03:00