Skip to content

Conversation

@masteryhx
Copy link
Contributor

@masteryhx masteryhx commented May 9, 2022

What is the purpose of the change

This pull request makes Changelog support state migration.

Brief change log

  • added upgradeKeyedState(final TypeSerializer<N> namespaceSerializer, StateDescriptor<S, V> stateDescriptor) in AbstractKeyedStateBackend
  • added upgrade( @Nonnull String stateName, @Nonnull TypeSerializer<T> byteOrderedElementSerializer) in PriorityQueueSetFactory

Verifying this change

  • added ChangelogStateBackendMigrationTest

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: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? no

@masteryhx masteryhx marked this pull request as draft May 9, 2022 11:14
@flinkbot
Copy link
Collaborator

flinkbot commented May 9, 2022

CI report:

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

@masteryhx masteryhx marked this pull request as ready for review May 19, 2022 12:54
@masteryhx masteryhx force-pushed the FLINK-23143 branch 8 times, most recently from 69b10ce to d6adb3d Compare May 28, 2022 07:43
Copy link
Contributor

@rkhachatryan rkhachatryan left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR @masteryhx and writing the design document.

I've left some comments, PTAL (let's see if the document needs to be updated).

Please also check the cause of the build failure.

@masteryhx masteryhx force-pushed the FLINK-23143 branch 2 times, most recently from aa9a328 to d9e294f Compare July 14, 2022 07:56
Copy link
Contributor

@rkhachatryan rkhachatryan left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR @masteryhx
I've left some comments, PTAL.

Copy link
Contributor

@rkhachatryan rkhachatryan left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR @masteryhx
I've left some comments, PTAL.

There is also a TODO associated with this ticket:

        // todo: support changing ttl (FLINK-23143)

which is currently not addressed.

@masteryhx
Copy link
Contributor Author

Thanks for updating the PR @masteryhx I've left some comments, PTAL.

There is also a TODO associated with this ticket:

        // todo: support changing ttl (FLINK-23143)

which is currently not addressed.

As we discussed offline, it should be supported in the delegated state backend.
I have added some tests in StateBackendMigrationTestBase.

Copy link
Contributor

@rkhachatryan rkhachatryan left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR @masteryhx
Production code changes LGTM.

I have some concerns regarding the test coverage, PTAL at the comments.

Besides that, commit 86bb0c2 seems not belonging to this PR;
and commits d49670b and 05d91de should be merged together.
So in the end I think there should be just two commits:

  • [refactor][state] Rename createInternalState to createOrUpdateInternalState
  • [FLINK-23143][state/changelog] Support state migration for ChangelogStateBackend

WDYT?

@masteryhx
Copy link
Contributor Author

Thanks for updating the PR @masteryhx Production code changes LGTM.

I have some concerns regarding the test coverage, PTAL at the comments.

Besides that, commit 86bb0c2 seems not belonging to this PR; and commits d49670b and 05d91de should be merged together. So in the end I think there should be just two commits:

  • [refactor][state] Rename createInternalState to createOrUpdateInternalState
  • [FLINK-23143][state/changelog] Support state migration for ChangelogStateBackend

WDYT?

I agree.
I have also created a seprate pr for updating the documentation about changing changelog from enabling to disabling
as you could see #20486

Copy link
Contributor

@rkhachatryan rkhachatryan left a comment

Choose a reason for hiding this comment

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

Thanks a lot for working on this PR @masteryhx,
LGTM.

@rkhachatryan rkhachatryan merged commit a267dcf into apache:master Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants