flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-37294][state] Support state migration between disabling and enabling ttl in HeapKeyedStateBackend

Open hejufang opened this issue 6 months ago • 5 comments

[FLINK-37294][state] Support state migration between disabling and enabling ttl in HeapKeyedStateBackend

What is the purpose of the change

Support state migration between disabling and enabling ttl in HeapKeyedStateBackend

Brief change log

Add migrateTtlValue in AbstractHeapState. When the state TTL switch changes, trigger the migration of state data.

Verifying this change

This change is already covered by existing tests, such as StateBackendMigrationTestBase#testStateMigrationAfterChangingTTLFromEnablingToDisabling and StateBackendMigrationTestBase#testStateMigrationAfterChangingTTLFromDisablingToEnabling.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

hejufang avatar Jun 08 '25 09:06 hejufang

CI report:

  • 82ea4f008db802639a061137c0045effff49b3fc Azure: SUCCESS
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Jun 08 '25 09:06 flinkbot

@hejufang Hi, I did some improvement for your implementation in this PR(https://github.com/apache/flink/pull/26674). I've also changed this commit as a co-authored commit. PTAL.

xiangyuf avatar Jun 12 '25 16:06 xiangyuf

@hejufang Hi, I did some improvement for your implementation in this PR(#26674). I've also changed this commit as a co-authored commit. PTAL.

@xiangyuf Thank you for the improvements. I have push the new commit to the current branch, and we can continue to track this PR.

hejufang avatar Jun 13 '25 03:06 hejufang

Cool, I've closed another PR.

xiangyuf avatar Jun 13 '25 03:06 xiangyuf

@Zakelly Kindly remind for review.

xiangyuf avatar Jun 13 '25 06:06 xiangyuf

@Zakelly kindly remind

hejufang avatar Jul 22 '25 03:07 hejufang

Thanks for the update! I'll take a look this week.

Zakelly avatar Jul 23 '25 10:07 Zakelly