You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Referring to pr: #269, after we refactored the sync, we found that the first log (file_seq == 1) is always empty when setting target-file-size < LogFileFormat::encoded_len().
The root cause is that we will check whether to do rotate before each real write, in the processing of append.
if active_file.writer.offset() >= self.target_file_size{
ifletErr(e) = self.rotate_imp(&mut active_file){
And if we set target-file-size with a abnormal value, such as 1, the startup of Pipe will automatically generate the first seq file with sequence number 1. Any append to this Pipe will not be added to the first file, which will be added to the next seq file, file_seq == 2.
The text was updated successfully, but these errors were encountered:
Referring to pr: #269, after we refactored the
sync
, we found that the first log (file_seq == 1
) is always empty when settingtarget-file-size < LogFileFormat::encoded_len()
.The root cause is that we will check whether to do
rotate
before each real write, in the processing ofappend
.raft-engine/src/file_pipe_log/pipe.rs
Lines 355 to 356 in 618eea7
And if we set
target-file-size
with a abnormal value, such as1
, the startup ofPipe
will automatically generate the first seq file with sequence number1
. Anyappend
to thisPipe
will not be added to the first file, which will be added to the next seq file,file_seq == 2
.The text was updated successfully, but these errors were encountered: