Skip to content

Commit

Permalink
Use os path separator to split blocks path (#3568)
Browse files Browse the repository at this point in the history
* Use os path separator to split blocks path

* Add changelog

* Fix order
  • Loading branch information
teyyubismayil committed Apr 12, 2024
1 parent 475312b commit f9b37a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* [BUGFIX] Correctly handle 429s in GRPC search streaming. [#3469](https://github.com/grafana/tempo/pull/3469) (@joe-ellitot)
* [BUGFIX] Correctly cancel GRPC and HTTP contexts in the frontend to prevent having to rely on http write timeout. [#3443](https://github.com/grafana/tempo/pull/3443) (@joe-elliott)
* [BUGFIX] Add spss and limit to the frontend cache key to prevent the return of incorrect results. [#3557](https://github.com/grafana/tempo/pull/3557) (@joe-elliott)
* [BUGFIX] Use os path separator to split blocks path. [#3552](https://github.com/grafana/tempo/issues/3552) (@teyyubismayil)

## v2.4.1

Expand Down
9 changes: 5 additions & 4 deletions tempodb/backend/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ type Backend struct {
}

var (
_ backend.RawReader = (*Backend)(nil)
_ backend.RawWriter = (*Backend)(nil)
_ backend.Compactor = (*Backend)(nil)
_ backend.RawReader = (*Backend)(nil)
_ backend.RawWriter = (*Backend)(nil)
_ backend.Compactor = (*Backend)(nil)
pathSeparatorStr = string(os.PathSeparator)
)

func NewBackend(cfg *Config) (*Backend, error) {
Expand Down Expand Up @@ -161,7 +162,7 @@ func (rw *Backend) ListBlocks(_ context.Context, tenant string) (metas []uuid.UU

tenantFilePath := filepath.Join(tenant, path)

parts := strings.Split(tenantFilePath, "/")
parts := strings.Split(tenantFilePath, pathSeparatorStr)
// i.e: <tenantID/<blockID>/meta
if len(parts) != 3 {
return nil
Expand Down

0 comments on commit f9b37a8

Please sign in to comment.