Skip to content

Commit

Permalink
simplify needsCopy
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott committed Dec 14, 2023
1 parent c555ecd commit 13c0e48
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tempodb/backend/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,5 @@ func store(ctx context.Context, cache cache.Cache, role cache.Role, key string,
// needsCopy returns true if the role should be copied into a new buffer before being written to the cache
// todo: should this be signalled through cacheinfo instead?
func needsCopy(role cache.Role) bool {
if role == cache.RoleParquetPage { // parquet pages are reused by the library. if we don't copy them then the buffer may be reused before written to cache
return true
}

return false
return role == cache.RoleParquetPage // parquet pages are reused by the library. if we don't copy them then the buffer may be reused before written to cache
}

0 comments on commit 13c0e48

Please sign in to comment.