mirror of https://github.com/ByConity/ByConity
Merge 'cnch_dev_fix_multi_round_dedup' into 'cnch-dev'
fix(clickhousech@m-5371640225): fix multi round dedup with dump then read See merge request: !25908
This commit is contained in:
parent
e181b2a622
commit
46e3c945cf
|
@ -618,7 +618,7 @@ IMergeTreeDataPart::ChecksumsPtr IMergeTreeDataPart::getChecksums() const
|
|||
/// XXX: Currently, the checksum of a part depends on the remote load, which is unreasonable.
|
||||
/// The mutation in the file of the memory part object may not correct.
|
||||
/// Here we do special processing for partial update
|
||||
if (needPartialUpdateProcess())
|
||||
if (partial_update_state != PartialUpdateState::NotPartialUpdate)
|
||||
{
|
||||
for (auto & file : res->files)
|
||||
file.second.mutation = parent_part ? parent_part->info.mutation : info.mutation;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
2023-01-02 1005 30 d2 x2
|
|
@ -0,0 +1,26 @@
|
|||
DROP TABLE IF EXISTS unique_partial_update_multi_round;
|
||||
|
||||
CREATE TABLE unique_partial_update_multi_round
|
||||
(
|
||||
`p_date` Date,
|
||||
`id` UInt32,
|
||||
`number` UInt32,
|
||||
`content` String,
|
||||
`extra` String
|
||||
)
|
||||
ENGINE = CnchMergeTree
|
||||
PARTITION BY p_date
|
||||
ORDER BY id
|
||||
UNIQUE KEY id
|
||||
SETTINGS enable_unique_partial_update = 1, partial_update_max_process_parts = 1, partial_update_optimize_for_batch_task = 0;
|
||||
|
||||
SYSTEM STOP DEDUP WORKER unique_partial_update_multi_round;
|
||||
|
||||
SET enable_staging_area_for_write=1, enable_unique_partial_update=1;
|
||||
INSERT INTO unique_partial_update_multi_round VALUES ('2023-01-02', 1005, 30, 'd2', 'x2');
|
||||
|
||||
SET enable_staging_area_for_write=0, enable_unique_partial_update=1;
|
||||
INSERT INTO unique_partial_update_multi_round VALUES ('2023-01-02', 1005, 30, 'd2', 'x2');
|
||||
|
||||
SELECT * FROM unique_partial_update_multi_round ORDER BY id;
|
||||
DROP TABLE IF EXISTS unique_partial_update_multi_round;
|
Loading…
Reference in New Issue