-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-35125][state] Implement ValueState for ForStStateBackend #24671
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljz2051 Thanks for the PR, I left some comments, PTAL
* @param <K> Type of the key in the state. | ||
*/ | ||
@Internal | ||
public interface InternalSyncState<K> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SyncState
is a little bit strange, I'm not sure if InternalUnderlyingState
would be better, maybe we can seek other people’s opinions.
* | ||
* @return True if supported, false if not. | ||
*/ | ||
default boolean isSupportMultiGet() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, InternalSyncState
is a high-level base interface for different state backend, isSupportMultiGet()
seems to be bound to a specific implementation. I think supportBatchGet/supportBatchPut
may be better, WDYT?
|
||
protected final WriteOptions writeOptions; | ||
|
||
protected final TypeSerializer<K> keySerializer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsnamespaceSerializer
needed here?
|
||
protected final TypeSerializer<V> valueSerializer; | ||
|
||
private final ThreadLocal<SerializedCompositeKeyBuilder<K>> serializedKeyBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will serializedKeyBuilder
be accessed concurrently? How about adding some comments about ThreadLocal
?
What is the purpose of the change
This pull request implements the ValueState for ForStStateBackend.
Brief change log
Verifying this change
This change added tests and can be verified by ForStValueStateTest.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation