support read option readDeleted=true

This commit is contained in:
Chris Lu
2020-08-18 19:22:16 -07:00
parent 6ccd7f0a4d
commit fe01191b5b
7 changed files with 31 additions and 26 deletions

View File

@@ -12,7 +12,7 @@ import (
var (
MarkNeedleDeleted = func(file *os.File, offset int64) error {
b := make([]byte, types.SizeSize)
util.Uint32toBytes(b, types.TombstoneFileSize)
types.SizeToBytes(b, types.TombstoneFileSize)
n, err := file.WriteAt(b, offset+types.NeedleIdSize+types.OffsetSize)
if err != nil {
return fmt.Errorf("sorted needle write error: %v", err)