OneSizeFitsQuorum commented on code in PR #11291:
URL: https://github.com/apache/iotdb/pull/11291#discussion_r1361880252
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java:
##########
@@ -833,6 +833,21 @@ public void skipTo(long targetIndex) {
targetIndex,
targetIndex);
}
+
+ if (itr != null
+ && itr.hasNext()
+ && insertNodes.get(itr.nextIndex()).getSearchIndex() <= targetIndex
+ && targetIndex <= insertNodes.get(insertNodes.size() -
1).getSearchIndex()) {
Review Comment:
How about changing the type of insertNodes to LinkedList, so you can use
`insertNodes.getLast().getSearchIndex()` here
--
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]