tillrohrmann commented on a change in pull request #9501: [FLINK-12697] [State
Backends] Support on-disk state storage for spill-able heap backend
URL: https://github.com/apache/flink/pull/9501#discussion_r334021831
##########
File path:
flink-state-backends/flink-statebackend-heap-spillable/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteSkipListStateMap.java
##########
@@ -371,72 +324,44 @@ long getNode(ByteBuffer keyByteBuffer, int keyOffset,
int keyLen) {
*/
@VisibleForTesting
S putNode(ByteBuffer keyByteBuffer, int keyOffset, int keyLen, byte[]
value, boolean returnOldState) {
- int deleteCount = 0;
- long prevNode = findPredecessor(keyByteBuffer, keyOffset, 1);
- long currentNode = helpGetNextNode(prevNode, 0);
- long nextNode;
-
- int c;
- for ( ; ; ) {
- if (currentNode != NIL_NODE) {
- nextNode = helpGetNextNode(currentNode, 0);
+ Tuple4<Long, Long, Boolean, S> result =
iterateAndProcess(keyByteBuffer, keyOffset, keyLen,
+ (tuple3, isRemoved) -> {
Review comment:
I would suggest to factor this out in a separate method
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services