-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[s3] recursive list of keys on filer store with SQL #5580
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
base: master
Are you sure you want to change the base?
[s3] recursive list of keys on filer store with SQL #5580
Conversation
return lastFileName, fmt.Errorf("findDB %s : %v", dirPath, err) | ||
} | ||
glog.V(5).Infof("ListRecursivePrefixedEntries lastFileName %s shortPath %v, prefix %v, sql %s", lastFileName, string(shortPath), prefix, store.GetSqlListRecursive(bucket)) | ||
rows, err := db.QueryContext(ctx, store.GetSqlListRecursive(bucket), startFileName, util.HashStringToLong(string(shortPath)), prefix+"%", string(shortPath)+prefix+"%", limit+1) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a
user-provided value
|
Hi, I wanted to leave the allowListRecursive option for some time, as an experimental one, since the tests do not cover all possible cases and might break something for someone.
I don’t understand what changes we are talking about here, but the data structure in the stores does not change, perhaps indexes will need to be added for SQL.
It is large mainly because of the plug functions for each filer. But I will try to reduce it as much as I can by moving the new Ceph S3 tests fixes into a separate PR and adding new github actions tests. |
This would need a secondary index on |
# Conflicts: # .github/workflows/s3tests.yml # weed/s3api/s3api_object_handlers.go # weed/server/filer_server_handlers_write_autochunk.go
What problem are we solving?
The registers contain a large number of nested keys, which leads to exponential growth of the query list for each subdirectory.
How are we solving the problem?
Iterating over keys by prefix on the SQL side of the database
How is the PR tested?
all list v2 tests