Skip to content

Commit efa1620

Browse files
committed
chore: rename named ssts
We use these ssts in our datadriven tool testing. In the future, we will need to be able to parse the file number of such ssts in order to properly collect each sst's blob reference.
1 parent 98ed96c commit efa1620

File tree

37 files changed

+142
-155
lines changed

37 files changed

+142
-155
lines changed

internal/sstableinternal/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
// CacheOptions contains the information needed to interact with the block
1313
// cache.
1414
type CacheOptions struct {
15-
// CacheHandle can be nil, in which case no cache is used. When non-nil, the other
16-
// fields must be set accordingly.
15+
// CacheHandle can be nil, in which case no cache is used. When non-nil, the
16+
// other fields must be set accordingly.
1717
CacheHandle *cache.Handle
1818
FileNum base.DiskFileNum
1919
}

sstable/compressionanalyzer/testdata/file_analyzer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sst
2-
../testdata/h.sst
2+
../testdata/hamlet-sst/000002.sst
33
----
44
Kind Size Range Test CR Samples Size Snappy MinLZ1 MinLZ2 ZSTD1 ZSTD3 ZSTD5 ZSTD7
55
data <24KB 1.5-2.5 14 1.9KB ± 25% CR 1.9 ± 5% 0.0 ± 0% 0.0 ± 0% 0.0 ± 0% 0.0 ± 0% 0.0 ± 0% 0.0 ± 0%

sstable/properties_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestPropertiesLoad(t *testing.T) {
4444

4545
{
4646
// Check that we can read properties from a table.
47-
f, err := vfs.Default.Open(filepath.FromSlash("testdata/h.sst"))
47+
f, err := vfs.Default.Open(filepath.FromSlash("testdata/hamlet-sst/000002.sst"))
4848
require.NoError(t, err)
4949

5050
r, err := newReader(f, ReaderOptions{})

sstable/reader_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ func TestValidateBlockChecksums(t *testing.T) {
16281628
{
16291629
name: "top index block corruption",
16301630
files: []string{
1631-
"h.no-compression.two_level_index.sst",
1631+
"h-no-compression-two-level-index-sst/000003.sst",
16321632
},
16331633
corruptionLocations: []corruptionLocation{
16341634
corruptionLocationTopIndex,
@@ -1637,9 +1637,9 @@ func TestValidateBlockChecksums(t *testing.T) {
16371637
{
16381638
name: "filter block corruption",
16391639
files: []string{
1640-
"h.table-bloom.no-compression.prefix_extractor.no_whole_key_filter.sst",
1641-
"h.table-bloom.no-compression.sst",
1642-
"h.table-bloom.sst",
1640+
"h-table-bloom-no-compression-prefix-extractor-no-whole-key-filter-sst/000013.sst",
1641+
"h-table-bloom-no-compression-sst/000011.sst",
1642+
"h-table-bloom-sst/000010.sst",
16431643
},
16441644
corruptionLocations: []corruptionLocation{
16451645
corruptionLocationFilter,

sstable/table_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@ func testReader(t *testing.T, filename string, comparer *Comparer, fp FilterPoli
250250

251251
func TestReaderDefaultCompression(t *testing.T) {
252252
defer leaktest.AfterTest(t)()
253-
testReader(t, "h.sst", nil, nil)
253+
testReader(t, "hamlet-sst/000002.sst", nil, nil)
254254
}
255255

256256
func TestReaderNoCompression(t *testing.T) {
257257
defer leaktest.AfterTest(t)()
258-
testReader(t, "h.no-compression.sst", nil, nil)
258+
testReader(t, "h-no-compression-sst/000012.sst", nil, nil)
259259
}
260260

261261
func TestReaderTableBloom(t *testing.T) {
262262
defer leaktest.AfterTest(t)()
263-
testReader(t, "h.table-bloom.no-compression.sst", nil, nil)
263+
testReader(t, "h-table-bloom-no-compression-sst/000011.sst", nil, nil)
264264
}
265265

266266
func TestReaderBloomUsed(t *testing.T) {
@@ -283,8 +283,8 @@ func TestReaderBloomUsed(t *testing.T) {
283283
path string
284284
comparer *Comparer
285285
}{
286-
{"h.table-bloom.no-compression.sst", nil},
287-
{"h.table-bloom.no-compression.prefix_extractor.no_whole_key_filter.sst", fixtureComparer},
286+
{"h-table-bloom-no-compression-sst/000011.sst", nil},
287+
{"h-table-bloom-no-compression-prefix-extractor-no-whole-key-filter-sst/000013.sst", fixtureComparer},
288288
}
289289
for _, tc := range files {
290290
t.Run(tc.path, func(t *testing.T) {
@@ -325,7 +325,7 @@ func TestReaderBloomUsed(t *testing.T) {
325325

326326
func TestBloomFilterFalsePositiveRate(t *testing.T) {
327327
defer leaktest.AfterTest(t)()
328-
f, err := vfs.Default.Open(filepath.FromSlash("testdata/h.table-bloom.no-compression.sst"))
328+
f, err := vfs.Default.Open(filepath.FromSlash("testdata/h-table-bloom-no-compression-sst/000011.sst"))
329329
require.NoError(t, err)
330330

331331
c := &countingFilterPolicy{
@@ -500,7 +500,7 @@ func TestFinalBlockIsWritten(t *testing.T) {
500500

501501
func TestReaderSymtheticSeqNum(t *testing.T) {
502502
defer leaktest.AfterTest(t)()
503-
f, err := vfs.Default.Open(filepath.FromSlash("testdata/h.sst"))
503+
f, err := vfs.Default.Open(filepath.FromSlash("testdata/hamlet-sst/000002.sst"))
504504
require.NoError(t, err)
505505

506506
r, err := newReader(f, ReaderOptions{})

sstable/test_fixtures.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,55 +188,55 @@ type TestFixtureInfo struct {
188188
// TestFixtures contains all metadata necessary to generate the test SSTs.
189189
var TestFixtures = []TestFixtureInfo{
190190
{
191-
Filename: "h.sst",
191+
Filename: "hamlet-sst/000002.sst",
192192
Compression: block.SnappyCompression,
193193
FullKeyFilter: false,
194194
PrefixFilter: false,
195195
IndexBlockSize: fixtureDefaultIndexBlockSize,
196196
UseFixtureComparer: false,
197197
},
198198
{
199-
Filename: "h.no-compression.sst",
199+
Filename: "h-no-compression-sst/000012.sst",
200200
Compression: block.NoCompression,
201201
FullKeyFilter: false,
202202
PrefixFilter: false,
203203
IndexBlockSize: fixtureDefaultIndexBlockSize,
204204
UseFixtureComparer: false,
205205
},
206206
{
207-
Filename: "h.table-bloom.sst",
207+
Filename: "h-table-bloom-sst/000010.sst",
208208
Compression: block.SnappyCompression,
209209
FullKeyFilter: true,
210210
PrefixFilter: false,
211211
IndexBlockSize: fixtureDefaultIndexBlockSize,
212212
UseFixtureComparer: false,
213213
},
214214
{
215-
Filename: "h.table-bloom.no-compression.sst",
215+
Filename: "h-table-bloom-no-compression-sst/000011.sst",
216216
Compression: block.NoCompression,
217217
FullKeyFilter: true,
218218
PrefixFilter: false,
219219
IndexBlockSize: fixtureDefaultIndexBlockSize,
220220
UseFixtureComparer: false,
221221
},
222222
{
223-
Filename: "h.table-bloom.no-compression.prefix_extractor.no_whole_key_filter.sst",
223+
Filename: "h-table-bloom-no-compression-prefix-extractor-no-whole-key-filter-sst/000013.sst",
224224
Compression: block.NoCompression,
225225
FullKeyFilter: false,
226226
PrefixFilter: true,
227227
IndexBlockSize: fixtureDefaultIndexBlockSize,
228228
UseFixtureComparer: true,
229229
},
230230
{
231-
Filename: "h.no-compression.two_level_index.sst",
231+
Filename: "h-no-compression-two-level-index-sst/000003.sst",
232232
Compression: block.NoCompression,
233233
FullKeyFilter: false,
234234
PrefixFilter: false,
235235
IndexBlockSize: fixtureSmallIndexBlockSize,
236236
UseFixtureComparer: false,
237237
},
238238
{
239-
Filename: "h.zstd-compression.sst",
239+
Filename: "h-zstd-compression-sst/000004.sst",
240240
Compression: block.ZstdCompression,
241241
FullKeyFilter: false,
242242
PrefixFilter: false,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)