tkalkirill commented on code in PR #920:
URL: https://github.com/apache/ignite-3/pull/920#discussion_r921201820
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointDirtyPages.java:
##########
@@ -161,109 +164,24 @@ public CheckpointDirtyPagesQueue toQueue() {
return null;
}
- List<FullPageId> pageIds = dirtyPages.get(regionIndex).getValue();
+ FullPageId[] pageIds = dirtyPages.get(regionIndex).dirtyPages.pageIds;
- if (fromPosition == pageIds.size() - 1 ||
!equalsByGroupAndPartition(pageIds.get(fromPosition), pageIds.get(fromPosition
+ 1))) {
+ if (fromPosition == pageIds.length - 1 ||
!equalsByGroupAndPartition(pageIds[fromPosition], pageIds[fromPosition + 1])) {
return new CheckpointDirtyPagesView(regionIndex, fromPosition,
fromPosition);
}
- FullPageId startPageId = pageIds.get(fromPosition);
+ FullPageId startPageId = pageIds[fromPosition];
FullPageId endPageId = new
FullPageId(pageId(partitionId(startPageId.pageId()) + 1, (byte) 0, 0),
startPageId.groupId());
- int toPosition = binarySearch(pageIds.subList(fromPosition,
pageIds.size()), endPageId, DIRTY_PAGE_COMPARATOR);
+ int toPosition = binarySearch(pageIds, fromPosition, pageIds.length,
endPageId, DIRTY_PAGE_COMPARATOR);
toPosition = toPosition > 0 ? toPosition - 1 : -toPosition - 2;
Review Comment:
Now **toPosition** is not included.
--
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]