Skip to content

Commit 149dc2b

Browse files
committed
block: remove 'table' from error messages
Remove mention of 'table' from codepaths used by both sstable and blob file readers.
1 parent c0b18bc commit 149dc2b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sstable/block/block.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ func (r *Reader) doRead(
569569
env.BlockRead(bh.Length, readDuration)
570570
if err = ValidateChecksum(r.checksumType, compressed.BlockData(), bh); err != nil {
571571
compressed.Release()
572-
err = errors.Wrapf(err, "pebble/table: table %s", r.opts.CacheOpts.FileNum)
572+
err = errors.Wrapf(err, "pebble: file %s", r.opts.CacheOpts.FileNum)
573573
return Value{}, err
574574
}
575575
typ := CompressionIndicator(compressed.BlockData()[bh.Length])
@@ -646,7 +646,7 @@ func ReadRaw(
646646
) ([]byte, error) {
647647
size := f.Size()
648648
if size < int64(len(buf)) {
649-
return nil, base.CorruptionErrorf("pebble/table: invalid table %s (file size is too small)", errors.Safe(fileNum))
649+
return nil, base.CorruptionErrorf("pebble: invalid file %s (file size is too small)", errors.Safe(fileNum))
650650
}
651651

652652
readStopwatch := makeStopwatch()
@@ -664,7 +664,7 @@ func ReadRaw(
664664
len(buf), readDuration.String())
665665
}
666666
if err != nil {
667-
return nil, errors.Wrap(err, "pebble/table: invalid table (could not read footer)")
667+
return nil, errors.Wrap(err, "pebble: invalid file (could not read footer)")
668668
}
669669
return buf, nil
670670
}

sstable/block/compressor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (snappyDecompressor) DecompressInto(buf, compressed []byte) error {
7878
return err
7979
}
8080
if len(result) != len(buf) || (len(result) > 0 && &result[0] != &buf[0]) {
81-
return base.CorruptionErrorf("pebble/table: decompressed into unexpected buffer: %p != %p",
81+
return base.CorruptionErrorf("pebble: decompressed into unexpected buffer: %p != %p",
8282
errors.Safe(result), errors.Safe(buf))
8383
}
8484
return nil
@@ -94,7 +94,7 @@ func (zstdDecompressor) DecompressedLen(b []byte) (decompressedLen int, err erro
9494
// if we implement these algorithms in the future.
9595
decodedLenU64, varIntLen := binary.Uvarint(b)
9696
if varIntLen <= 0 {
97-
return 0, base.CorruptionErrorf("pebble/table: compression block has invalid length")
97+
return 0, base.CorruptionErrorf("pebble: compression block has invalid length")
9898
}
9999
return int(decodedLenU64), nil
100100
}

tool/testdata/sstable_check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ WARNING: OUT OF ORDER KEYS!
4444
sstable check
4545
testdata/corrupted.sst
4646
----
47-
corrupted.sst: pebble/table: table 000000: block 87/465: crc32c checksum mismatch c8539ba5 != b972e324
47+
corrupted.sst: pebble: file 000000: block 87/465: crc32c checksum mismatch c8539ba5 != b972e324
4848

4949
sstable check
5050
testdata/bad-magic.sst

0 commit comments

Comments
 (0)