Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Oct 10, 2023
1 parent 1d713c6 commit 9ea4bcf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions changeset/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/binary"
"fmt"
"io"
"math"
"math/bits"
"os"
"path/filepath"
Expand Down Expand Up @@ -158,13 +157,6 @@ func collectChunksToSegment(outputFile string, chunkFiles []string) error {
}
}

var endingHeader [16]byte
binary.LittleEndian.PutUint64(endingHeader[:], math.MaxUint64)
binary.LittleEndian.PutUint64(endingHeader[8:], uint64(0))
if _, err := writer.Write(endingHeader[:]); err != nil {
return err
}

return bufWriter.Flush()
}

Expand Down Expand Up @@ -205,7 +197,7 @@ func WriteChangeSet(writer io.Writer, version int64, cs iavl.ChangeSet) error {
fmt.Printf("Writing version %d with %d items at %s\n", version, len(items), time.Now().Format(time.RFC3339))
var versionHeader [16]byte
binary.LittleEndian.PutUint64(versionHeader[:], uint64(version))
binary.LittleEndian.PutUint64(versionHeader[8:], uint64(size))
binary.LittleEndian.PutUint64(versionHeader[8:16], uint64(size))

if _, err := writer.Write(versionHeader[:]); err != nil {
return err
Expand Down

0 comments on commit 9ea4bcf

Please sign in to comment.