Skip to content

Remove shared_store and shared_store_key_prefix from shipper and compactor #10840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests and check-format
  • Loading branch information
ashwanthgoli committed Oct 10, 2023
commit 3e01c94c61212bb7eac3128d6274337ae116e6e8
2 changes: 1 addition & 1 deletion pkg/loki/config_wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ schema_config:
index:
prefix: index_
period: 24h`
config, _ := testContext(boltdbSchemaConfig, []string{"-boltdb.shipper.compactor.shared-store", "s3", "-boltdb.shipper.shared-store", "s3"})
config, _ := testContext(boltdbSchemaConfig, []string{"-boltdb.shipper.compactor.shared-store", "s3"})

assert.Equal(t, "/opt/loki/boltdb-shipper-active", config.StorageConfig.BoltDBShipperConfig.ActiveIndexDirectory)
assert.Equal(t, "/opt/loki/boltdb-shipper-cache", config.StorageConfig.BoltDBShipperConfig.CacheLocation)
Expand Down
18 changes: 10 additions & 8 deletions pkg/storage/stores/shipper/bloomshipper/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,19 +524,21 @@ func createPeriodConfigs() []config.PeriodConfig {
ObjectType: "folder-1",
// from 2023-09-20: table range [19620:19623]
From: config.DayTime{Time: model.TimeFromUnix(time.Date(2023, time.September, 20, 0, 0, 0, 0, time.UTC).Unix())},
IndexTables: config.PeriodicTableConfig{
Period: day,
Prefix: "first-period-",
},
IndexTables: config.IndexPeriodicTableConfig{
PeriodicTableConfig: config.PeriodicTableConfig{
Period: day,
Prefix: "first-period-",
}},
},
{
ObjectType: "folder-2",
// from 2023-09-24: table range [19624:19627]
From: config.DayTime{Time: model.TimeFromUnix(time.Date(2023, time.September, 24, 0, 0, 0, 0, time.UTC).Unix())},
IndexTables: config.PeriodicTableConfig{
Period: day,
Prefix: "second-period-",
},
IndexTables: config.IndexPeriodicTableConfig{
PeriodicTableConfig: config.PeriodicTableConfig{
Period: day,
Prefix: "second-period-",
}},
},
}
return periodicConfigs
Expand Down
2 changes: 1 addition & 1 deletion tools/tsdb/helpers/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func GetPeriodConfigForTableNumber(table string, periodicConfigs []config.Period
}
}

return config.PeriodConfig{}, config.TableRange{}, "", fmt.Errorf("table does not belong to any period.")
return config.PeriodConfig{}, config.TableRange{}, "", fmt.Errorf("table does not belong to any period")
}

func ResolveTenants(objectClient client.ObjectClient, pathPrefix, tableName string) ([]string, error) {
Expand Down
2 changes: 1 addition & 1 deletion tools/tsdb/migrate-versions/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestMigrateTables(t *testing.T) {
ObjectType: "filesystem",
Schema: "v12",
IndexTables: config.IndexPeriodicTableConfig{
PathPrefix: "/index",
PathPrefix: "index/",
PeriodicTableConfig: config.PeriodicTableConfig{
Prefix: indexPrefix,
Period: 24 * time.Hour,
Expand Down