mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #44349 from hanfei1991/hanfei/fix-async-flaky
fix flack test "02481_async_insert_dedup"
This commit is contained in:
commit
5a6cdd4825
@ -485,7 +485,8 @@ void ReplicatedMergeTreeSinkImpl<true>::finishDelayedChunk(const ZooKeeperWithFa
|
||||
auto conflict_block_ids = commitPart(zookeeper, partition.temp_part.part, partition.block_id, delayed_chunk->replicas_num, false);
|
||||
if (conflict_block_ids.empty())
|
||||
break;
|
||||
LOG_DEBUG(log, "Found depulicate block IDs: {}, retry times {}", toString(conflict_block_ids), ++retry_times);
|
||||
++retry_times;
|
||||
LOG_DEBUG(log, "Found duplicate block IDs: {}, retry times {}", toString(conflict_block_ids), retry_times);
|
||||
/// partition clean conflict
|
||||
rewriteBlock(log, partition, conflict_block_ids);
|
||||
if (partition.block_id.empty())
|
||||
|
@ -104,13 +104,17 @@ while (True):
|
||||
result = result.split()
|
||||
err = False
|
||||
errMsg = ""
|
||||
for i in range(total_number):
|
||||
expect = str(i+1)
|
||||
real = result[i]
|
||||
if expect != real:
|
||||
err = True
|
||||
errMsg = "error, {} is not equal to {} for {}-th elements, total rows is {}".format(real, expect, i, len(result))
|
||||
break
|
||||
if len(result) != total_number:
|
||||
err = True
|
||||
errMsg = f"the size of result is {len(result)}. we expect {total_number}."
|
||||
else:
|
||||
for i in range(total_number):
|
||||
expect = str(i+1)
|
||||
real = result[i]
|
||||
if expect != real:
|
||||
err = True
|
||||
errMsg = f"error, real value {real} is not equal to expect value {expect} for {i}-th elements"
|
||||
break
|
||||
# retry several times to get stable results.
|
||||
if err and retry >= 5:
|
||||
print (errMsg, flush=True)
|
||||
|
Loading…
Reference in New Issue
Block a user