Skip to content

Commit

Permalink
Add an unresolved bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qishenonly committed Sep 10, 2023
1 parent 4e7b812 commit c0214bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/wal/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func (w *Wal) InitReading() {
// ReadNext reads the next operation from the WAL.
func (w *Wal) ReadNext() (*Record, error) {
buffer := make([]byte, 4+2+1+4) // Buffer size to read headers

//TODO: has bug here, get the buffer is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
_, err := w.m.Read(buffer, w.readOffset)
if err == io.EOF {
return nil, io.EOF
Expand Down

0 comments on commit c0214bf

Please sign in to comment.