travisjeffery / proglog

grpc log service example project
185 stars 74 forks source link

Agent does not close raft log #5

Open varunbpatil opened 2 years ago

varunbpatil commented 2 years ago

In *DistributedLog.Close(), the raft logStore is not closed. As a result, the index file corresponding to the raft log is not truncated to its actual size. As a result, the index file is corrupt and cannot be read after restart.

xzbdmw commented 1 year ago

In *DistributedLog.Close(), the raft logStore is not closed. As a result, the index file corresponding to the raft log is not truncated to its actual size. As a result, the index file is corrupt and cannot be read after restart.

find the same problem,but how to fix this?

xzbdmw commented 1 year ago

In *DistributedLog.Close(), the raft logStore is not closed. As a result, the index file corresponding to the raft log is not truncated to its actual size. As a result, the index file is corrupt and cannot be read after restart.

the original code can't restore logs correctly, but when I fix this truncate bug it also can't work, the info says "Failed to append to logs:EOF"