Update index & offset encoding

Previously, the index & offsets were encoded as 8-character hex
strings, however, this limits the maximum value to a `uint32`. This
is normally not an issue, however, indices could go over the maximum
value of 4 billion over time and the offset could exceed this value
for an especially large WAL update. For safety, these encodings have
been updated to 16-character hex encodings.
This commit is contained in:
Ben Johnson
2022-02-08 12:49:36 -07:00
parent 54f3b94d3f
commit 006e4b7155
189 changed files with 203 additions and 197 deletions

2
db.go
View File

@@ -703,7 +703,7 @@ func (db *DB) cleanWAL(ctx context.Context) error {
return err
}
db.Logger.Printf("remove shadow index: %s/%08x", generation, index)
db.Logger.Printf("remove shadow index: %s/%s", generation, FormatIndex(index))
}
return nil