Skip to content

Conversation

@shuwenwei
Copy link
Member

Description

Add configuration item 'compaction_validation_level'.

# The level of validation after compaction
# The details of these three levels are as follows:
# 1. NONE: the validation after compaction is disabled.
# 2. OVERLAP_ONLY: the validation after compaction check overlap only.
# 3. OVERLAP_AND_FILE: the validation after compaction check overlap and file.
# Datatype: String
# compaction_validation_level=NONE

CompactionValidator validator = CompactionValidator.getInstance();
if (!validator.validateCompaction(
tsFileManager, targetTsFileList, storageGroupName, timePartition)) {
LOGGER.error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add more logs to illustrate why the validation is false.

}

@Override
public boolean validateCompaction(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this method can return a class such as ValidationResult to represent the validation-result and detailed message if the validation is false. So that the invoker can add more error handle logic when validation is not passed such as print detailed logs

@xingtanzjr xingtanzjr merged commit 0b22ec3 into apache:master Jun 16, 2023
THUMarkLau pushed a commit that referenced this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants