Skip to content

[tag] Force creating auto-tag even no data when calling trigger_tag_automatic_creation#7227

Open
JackeyLee007 wants to merge 1 commit intoapache:masterfrom
JackeyLee007:force-auto-tag2
Open

[tag] Force creating auto-tag even no data when calling trigger_tag_automatic_creation#7227
JackeyLee007 wants to merge 1 commit intoapache:masterfrom
JackeyLee007:force-auto-tag2

Conversation

@JackeyLee007
Copy link
Contributor

Purpose

Make sure the auto-tag exists as expected even when no data is provided.

The former version of procedure trigger_tag_automatic_creation creates the tag only if it finds the right snapshot which is after tag.creation-delay. This is not always okay.

As we know, the auto-tag would be created within the Flink CDC job. But it would fail if the Flink job:

  • crashes accidentally
  • fails to create checkpoint
  • is delayed in creating checkpoint

To meet the auto-tag expectation, I enhanced the trigger_tag_automatic_creation procedure by adding a new force parameter, defaulting to false. When it's true, and the auto-tag still does not exist after the first attempt at auto-creation, we make an empty commit to force the creation of the snapshot which could be used to create the auto-tag during the second run.

Tests

Flink UT TriggerTagAutomaticCreationProcedureITCase and Spark UT TriggerTagAutomaticCreationProcedureTest were adapted.

API and Format

NO

Documentation

Doc provied for the new parameter.

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.

1 participant