pkolaczk commented on code in PR #2460:
URL: https://github.com/apache/cassandra/pull/2460#discussion_r1253914705
##########
src/java/org/apache/cassandra/index/sai/disk/io/IndexFileUtils.java:
##########
@@ -77,7 +77,7 @@ public IndexInput openBlockingInput(File file)
public interface ChecksumWriter
{
- long getChecksum();
+ long getChecksum() throws IOException;
}
static class IncrementalChecksumSequentialWriter extends SequentialWriter
implements ChecksumWriter
Review Comment:
Just looked at it again and I'm afraid it is not so easy - this
`ChecksummedSequentialWriter` actually writes a series of checksums to separate
file. So it is kinda doing a different thing than what we want (at the moment)
in SAI. SAI is just interested in computing one checksum. Note that each writer
uses even a different structure to compute the checksum. I'm afraid that trying
to extract the common logic between those two or trying to blend those two
usecases into a single class is going to actually make the code more complex
and less readable, even if slghtly less duplicated.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]