-
Notifications
You must be signed in to change notification settings - Fork 3.6k
failed to sync index set fake for table
to s3 with prefix containing more than 2 delimiters
#17232
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
Comments
Inspecting my logs, it might also be causing a knock on Edit: Updated the log context to include more details |
Ok took a closer look at the function in question loki/pkg/storage/stores/shipper/indexshipper/storage/cached_client.go Lines 114 to 116 in e038d0f
It requires there to be 2 identifieriers to set the tableName and the userID correctly. this could be changed to: tableName := strings.Join(ss[:len(ss)-1], delimiter) // or s[:strings.LastIndex(s, delimiter)]
userID := ss[len(ss)-1] which should rebuild to: tableName: "my/weird/table/name"
userID: = "id" but this of course assumes that the table name is used in such a way that assumes the delimiter is not present. This all to say this is probably unintended behaviour. Still seems to only effect this specific component, with general functionality being fine and the other tsdb indexes ending up in the right places. |
I think this is unintended. Updated my config to:
seems to work fine, the indexes get migrated from |
Describe the bug
I am setting
path_prefix: index/
andprefix: v13/
this will result in a combined path ofindex/v13/table_num/name.tsdb.gz
This works fine.
I am able to operate and work with loki fine.
However, when loki tries to upload
index/v13/table_num/fake
it cannot do this because it errors out.In the code you are explicitly checking for prefixes to only contain 2 delimited names.
loki/pkg/storage/stores/shipper/indexshipper/storage/cached_client.go
Lines 97 to 100 in e038d0f
I couldn't find anything related to why exactly this needs to be a maximum of 2 delimited names.
The normal indexes seem to work fine, so why is the fake object throwing an error like this?
This can be worked around by simply setting to
prefix: v13_
or some-such, but I like that the s3 prefixes are nicely formatted, when I need to go investigate an issue, and the indexes are nicely organised when I need to update to a new schema version.It could also be that this subcomponent should not be enabled, if this is the case, can you point me to the relevant config block that would enable this subcomponent?
Found this from back in 2022, might be related.
#5909
To Reproduce
Set storage config to:
Expected behavior
No errors are produced for "normal" config
Alternatively: the documentation updated to warn you that this is bad config
Environment:
Screenshots, Promtail config, or terminal output
The text was updated successfully, but these errors were encountered: