sashapolo commented on code in PR #7610:
URL: https://github.com/apache/ignite-3/pull/7610#discussion_r2846977859


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/segstore/IndexFileManager.java:
##########
@@ -238,14 +291,14 @@ SegmentFilePointer getSegmentFilePointer(long groupId, 
long logIndex) throws IOE
 
         Path indexFile = 
indexFilesDir.resolve(indexFileName(indexFileMeta.indexFileProperties()));
 
-        // Index file payload is a 0-based array, which indices correspond to 
the [fileMeta.firstLogIndex, fileMeta.lastLogIndex) range.
-        long payloadArrayIndex = logIndex - 
indexFileMeta.firstLogIndexInclusive();
+        try (SeekableByteChannel channel = Files.newByteChannel(indexFile, 
StandardOpenOption.READ)) {

Review Comment:
   > Are we doing it on every read?
   
   Yes, I have a ticket for optimizing this, I'll add a TODO 



-- 
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]

Reply via email to