Skip to content

[core] Supports only execute specified actions during the writing process.#4884

Open
LinMingQiang wants to merge 3 commits intoapache:masterfrom
LinMingQiang:master-feat-addconf-toskip-action
Open

[core] Supports only execute specified actions during the writing process.#4884
LinMingQiang wants to merge 3 commits intoapache:masterfrom
LinMingQiang:master-feat-addconf-toskip-action

Conversation

@LinMingQiang
Copy link
Copy Markdown
Contributor

@LinMingQiang LinMingQiang commented Jan 11, 2025

Purpose

There are several operations during data writing such as partition-expire,snapshot-expire,create-tag...
Currently, these actions are either executed together or not executed at all in the framework.

The purpose of this PR is to supports skipping specified actions during writing.

For example : set 'write.skip-actions'='partition-expire' , the partition expiration action will be skipped during data writing, but snapshot-expire / auto create tag / full compact will still execute normally.

Linked issue: close #xxx

Tests

API and Format

Documentation

@LinMingQiang LinMingQiang reopened this Jan 12, 2025
@LinMingQiang LinMingQiang force-pushed the master-feat-addconf-toskip-action branch 2 times, most recently from 9d3fcef to ed49eb8 Compare January 12, 2025 02:30
@wwj6591812
Copy link
Copy Markdown
Contributor

Thanks for @LinMingQiang prepare this pr.
This is a good job, I recently received a similar request from some Paimon user in my company.

Copy link
Copy Markdown
Member

@xuzifu666 xuzifu666 left a comment

Choose a reason for hiding this comment

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

Good job and left some comments.

@LinMingQiang LinMingQiang force-pushed the master-feat-addconf-toskip-action branch from 7250389 to b3867f8 Compare January 12, 2025 15:37
@xuzifu666
Copy link
Copy Markdown
Member

+1

@LinMingQiang LinMingQiang force-pushed the master-feat-addconf-toskip-action branch from b3867f8 to 99dcebd Compare January 13, 2025 08:22
@LinMingQiang LinMingQiang marked this pull request as draft January 16, 2025 13:56
@LinMingQiang LinMingQiang force-pushed the master-feat-addconf-toskip-action branch 5 times, most recently from 2d26f9d to fd50ccd Compare January 20, 2025 13:03
@LinMingQiang LinMingQiang marked this pull request as ready for review January 20, 2025 13:04
@LinMingQiang LinMingQiang changed the title [core] Supports skipping specified actions during writing. [core] Supports only execute specified actions in write task. Jan 20, 2025
@LinMingQiang LinMingQiang changed the title [core] Supports only execute specified actions in write task. [core] Supports only execute specified actions during the writing process. Jan 20, 2025
@LinMingQiang
Copy link
Copy Markdown
Contributor Author

@JingsongLi PTAL, thanks!

TAG_AUTOMATIC_CREATION("tag-automatic-creation"),

// Actions during writing.
MINOR_COMPACT("minor-compact"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is strange here, in streaming mode, it is hard to say just doing minor compact.

Copy link
Copy Markdown
Contributor Author

@LinMingQiang LinMingQiang Feb 12, 2025

Choose a reason for hiding this comment

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

We can only keep full-compact and minor-compact action can be removed. minor-compact keep the original default logic.

|| doWriteActions.contains(WriteAction.PARTITION_EXPIRE);
}

public boolean doSnapshotExpireAction(Set<WriteAction> doWriteActions) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All these methods can be in WriteAction, they are just static methods.

@LinMingQiang LinMingQiang force-pushed the master-feat-addconf-toskip-action branch from fd50ccd to 3702c60 Compare February 12, 2025 08:23
TAG_AUTOMATIC_CREATION("tag-automatic-creation"),

// Actions during writing.
FULL_COMPACT("full-compact");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I cannot get why you want to add this. Full compact should be separate option.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should I add parameter write-action.compact.enable separately to control whether to execute compaction?
In my original conception, compact is one of the write-actions types like the others.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it more reasonable to directly use "compact"?

From the implementation code, this parameter only controls the compact behavior, while whether to perform a full compact or a minor compact is controlled by other parameters.

@baiyangtx
Copy link
Copy Markdown
Contributor

Do you intend to control the behavior of expire in compact action?

Based on our experience, the expire behavior is quite heavy and may cause the checkpoint to timeout during compact commit.

We expect to use separate and independent compact and expire job to handle these things.

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.

6 participants