Add recompression flag in ReplicatedEntry

This commit is contained in:
alesapin 2020-08-31 16:42:42 +03:00
parent adc18f4d3f
commit b20a0bc254
2 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,9 @@ void ReplicatedMergeTreeLogEntryData::writeText(WriteBuffer & out) const
out << s << '\n';
out << "into\n" << new_part_name;
out << "\ndeduplicate: " << deduplicate;
/// For backward compatibility write only if enabled
if (recompress)
out << "\nrecompress: " << recompress;
break;
case DROP_RANGE:
@ -149,7 +152,14 @@ void ReplicatedMergeTreeLogEntryData::readText(ReadBuffer & in)
}
in >> new_part_name;
if (format_version >= 4)
{
in >> "\ndeduplicate: " >> deduplicate;
in >> "\n";
if (in.eof())
trailing_newline_found = true;
else if (checkString("recompress\n", in))
in >> recompress;
}
}
else if (type_str == "drop" || type_str == "detach")
{

View File

@ -79,6 +79,7 @@ struct ReplicatedMergeTreeLogEntryData
Strings source_parts;
bool deduplicate = false; /// Do deduplicate on merge
bool recompress = false; /// Recompress parts on merge
String column_name;
String index_name;