Currently, when opening a preexisting log, QuorumDelegatingLog reads the entire log file, including the "contents" (payload) of each entry. A side effect of this is that it will detect a crc error in the written contents; however, maybe this behavior should be configurable?
The simplest improvement is, instead of reading each entry in its entirety, only read the header of each entry. If the header's type is DATA, the content can be skipped. If the type is QUORUM_CONFIGURATION, however, it must be read.
Reading only the headers may not cause less IO to happen. It will reduce
the amount of data transfer between kbufcache and user space, so that is a
plus.
I guess what I'm trying to say is, we should measure it!!
Currently, when opening a preexisting log, QuorumDelegatingLog reads the entire log file, including the "contents" (payload) of each entry. A side effect of this is that it will detect a crc error in the written contents; however, maybe this behavior should be configurable?
The simplest improvement is, instead of reading each entry in its entirety, only read the header of each entry. If the header's type is DATA, the content can be skipped. If the type is QUORUM_CONFIGURATION, however, it must be read.