rkhachatryan commented on a change in pull request #17945:
URL: https://github.com/apache/flink/pull/17945#discussion_r762086896
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyedStateBackend.java
##########
@@ -137,10 +137,25 @@
*/
boolean deregisterKeySelectionListener(KeySelectionListener<K> listener);
+ @Deprecated
default boolean isStateImmutableInStateBackend(CheckpointType
checkpointOptions) {
return false;
}
+ /**
+ * Whether it's safe to reuse key-value from the state-backend, e.g for
the purpose of
+ * optimization.
+ *
+ * <p>NOTE: this method should not be used to check for {@link
InternalPriorityQueue}, as the
+ * priority queue could be stored on different locations, e.g RocksDB
state-backend could store
+ * that on JVM heap if configuring HEAP as the time-service factory.
+ *
+ * @return returns ture if safe to reuse the key-value from the
state-backend.
+ */
+ default boolean isSafeToReuseState() {
Review comment:
Makes sense.
> Maybe we could rename the method KeyedStateBackend.isSafeToReuseState to
KeyedStateBackend.isSafeToReuseKVState
I think this renaming alone still makes sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]