Skip to content

Commit

Permalink
removes IndexPath from BlockRef
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Diehl <[email protected]>
  • Loading branch information
owen-d committed Feb 1, 2024
1 parent 8dc8ea7 commit 8c52cf3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pkg/bloomgateway/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ func createBlocks(t *testing.T, tenant string, n int, from, through model.Time,
}
block := bloomshipper.BlockRef{
Ref: ref,
IndexPath: "index.tsdb.gz",
BlockPath: fmt.Sprintf("block-%d", i),
}
meta := bloomshipper.Meta{
Expand Down Expand Up @@ -459,7 +458,6 @@ func createBlockRefsFromBlockData(t *testing.T, tenant string, data []bloomshipp
EndTimestamp: 0,
Checksum: 0,
},
IndexPath: fmt.Sprintf("index-%d", i),
BlockPath: fmt.Sprintf("block-%d", i),
})
}
Expand Down
1 change: 0 additions & 1 deletion pkg/storage/stores/shipper/bloomshipper/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (r Ref) Interval() Interval {

type BlockRef struct {
Ref
IndexPath string
BlockPath string
}

Expand Down
8 changes: 0 additions & 8 deletions pkg/storage/stores/shipper/bloomshipper/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ func Test_BloomClient_PutBlocks(t *testing.T) {
EndTimestamp: Date(2023, time.September, 21, 6, 0, 0),
Checksum: 1,
},
IndexPath: uuid.New().String(),
},
Data: awsio.ReadSeekNopCloser{ReadSeeker: bytes.NewReader([]byte(blockForFirstFolderData))},
}
Expand All @@ -281,7 +280,6 @@ func Test_BloomClient_PutBlocks(t *testing.T) {
EndTimestamp: Date(2023, time.September, 24, 6, 0, 0),
Checksum: 2,
},
IndexPath: uuid.New().String(),
},
Data: awsio.ReadSeekNopCloser{ReadSeeker: bytes.NewReader([]byte(blockForSecondFolderData))},
}
Expand All @@ -305,7 +303,6 @@ func Test_BloomClient_PutBlocks(t *testing.T) {
require.Equal(t, blockForFirstFolder.StartTimestamp, firstResultBlock.StartTimestamp)
require.Equal(t, blockForFirstFolder.EndTimestamp, firstResultBlock.EndTimestamp)
require.Equal(t, blockForFirstFolder.Checksum, firstResultBlock.Checksum)
require.Equal(t, blockForFirstFolder.IndexPath, firstResultBlock.IndexPath)
folder1 := bloomClient.storageConfig.NamedStores.Filesystem["folder-1"].Directory
savedFilePath := filepath.Join(folder1, path)
require.FileExists(t, savedFilePath)
Expand All @@ -329,7 +326,6 @@ func Test_BloomClient_PutBlocks(t *testing.T) {
require.Equal(t, blockForSecondFolder.StartTimestamp, secondResultBlock.StartTimestamp)
require.Equal(t, blockForSecondFolder.EndTimestamp, secondResultBlock.EndTimestamp)
require.Equal(t, blockForSecondFolder.Checksum, secondResultBlock.Checksum)
require.Equal(t, blockForSecondFolder.IndexPath, secondResultBlock.IndexPath)
folder2 := bloomClient.storageConfig.NamedStores.Filesystem["folder-2"].Directory

savedFilePath = filepath.Join(folder2, path)
Expand Down Expand Up @@ -359,7 +355,6 @@ func Test_BloomClient_DeleteBlocks(t *testing.T) {
EndTimestamp: Date(2023, time.September, 24, 6, 0, 0),
Checksum: 2,
},
IndexPath: uuid.New().String(),
},
{
Ref: Ref{
Expand All @@ -370,7 +365,6 @@ func Test_BloomClient_DeleteBlocks(t *testing.T) {
EndTimestamp: Date(2023, time.September, 21, 6, 0, 0),
Checksum: 1,
},
IndexPath: uuid.New().String(),
},
}
err := bloomClient.DeleteBlocks(context.Background(), blocksToDelete)
Expand Down Expand Up @@ -556,7 +550,6 @@ func createMetaEntity(
StartTimestamp: startTimestamp,
EndTimestamp: endTimestamp,
},
IndexPath: uuid.New().String(),
BlockPath: uuid.New().String(),
},
},
Expand All @@ -569,7 +562,6 @@ func createMetaEntity(
StartTimestamp: startTimestamp,
EndTimestamp: endTimestamp,
},
IndexPath: uuid.New().String(),
BlockPath: uuid.New().String(),
},
},
Expand Down

0 comments on commit 8c52cf3

Please sign in to comment.