Skip to content

Commit 1f091ae

Browse files
committed
blockkind: remove the Index Kind
It is used in the same way as the SSTableIndex Kind, and its entry in the kindString was never populated.
1 parent 0c92743 commit 1f091ae

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

sstable/block/blockkind/kind.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const (
1616
SSTableValue
1717
BlobValue
1818
BlobReferenceValueLivenessIndex
19-
Index
2019
Filter
2120
RangeDel
2221
RangeKey
@@ -28,8 +27,8 @@ const (
2827
var kindString = [...]string{
2928
Unknown: "unknown",
3029
SSTableData: "data",
31-
SSTableValue: "sstval",
3230
SSTableIndex: "index",
31+
SSTableValue: "sstval",
3332
BlobValue: "blobval",
3433
BlobReferenceValueLivenessIndex: "blobrefval",
3534
Filter: "filter",

sstable/block/compressor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestCompressor(t *testing.T) {
4141
ci, _ = compressor.Compress(dst, src, blockkind.BlobValue)
4242
require.Equal(t, compressionIndicatorFromAlgorithm(profile.ValueBlocks.Algorithm), ci)
4343

44-
ci, _ = compressor.Compress(dst, src, blockkind.Index)
44+
ci, _ = compressor.Compress(dst, src, blockkind.SSTableIndex)
4545
require.Equal(t, compressionIndicatorFromAlgorithm(profile.OtherBlocks.Algorithm), ci)
4646

4747
ci, _ = compressor.Compress(dst, src, blockkind.Metadata)

sstable/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func (r *Reader) readTopLevelIndexBlock(
354354
func (r *Reader) readIndexBlock(
355355
ctx context.Context, env block.ReadEnv, readHandle objstorage.ReadHandle, bh block.Handle,
356356
) (block.BufferHandle, error) {
357-
return r.blockReader.Read(ctx, env, readHandle, bh, blockkind.Index, r.initIndexBlockMetadata)
357+
return r.blockReader.Read(ctx, env, readHandle, bh, blockkind.SSTableIndex, r.initIndexBlockMetadata)
358358
}
359359

360360
// initIndexBlockMetadata initializes the Metadata for a data block. This will

0 commit comments

Comments
 (0)