You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/09/05 16:58:00 UTC

[GitHub] Myasuka commented on a change in pull request #6638: [FLINK-10267][State] Fix arbitrary iterator access on RocksDBMapIterator

Myasuka commented on a change in pull request #6638: [FLINK-10267][State] Fix arbitrary iterator access on RocksDBMapIterator
URL: https://github.com/apache/flink/pull/6638#discussion_r215349665
 
 

 ##########
 File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
 ##########
 @@ -595,6 +595,8 @@ private void loadCache() {
 				 */
 				if (lastEntry != null && !lastEntry.deleted) {
 					iterator.next();
+					cacheEntries.add(lastEntry);
+					cacheIndex = 1;
 
 Review comment:
   Thanks for your comments, I quite agree with your comments except that I prefer to call the `#nextEntry()` returned entry as `currentEntry`, since this entry points to the current position before any other `#nextEntry()` is invoked.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services