-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add bucket number limit check in Riak CS process #950
Conversation
The size of an user record is proportional to bucket number. If too many buckets were created, then the user's record gets large and access to anything owned by the user gets slow. This commit adds bucket number limitation in bucket creation, to prevent user record to grow too large. As this is not a strict check in a critical section, there might be a race condition in multiple bucket creations where they validate total number of owned buckets and then send requests to Stanchion. But bucket creation is a rare operation, this won't happen so frequently. The case where this commit can't prevent growth of an user object is, when buckets are frequently created and deleted; in that case the user record may have many deleted bucket records. But that will be pruned.
TODO: add tests |
Can we set |
|
Nice 😄 |
Tight corner case. A workaround is ... delete one bucket :) |
Added my workaround. Allow 101st bucket like S3 and error on 102nd bucket creation. Also, I cannot add disable-local-bucket-check |
4f62e63
to
1983e0e
Compare
Reverted my workaround. If allowing 101st bucket needed, just set |
Add bucket number limit check in Riak CS process Reviewed-by: shino
@borshop merge |
The size of an user record is proportional to bucket number. If too
many buckets were created, then the user's record gets large and
access to anything owned by the user gets slow. This commit adds
bucket number limitation in bucket creation, to prevent user record to
grow too large. As this is not a strict check in a critical section,
there might be a race condition in multiple bucket creations where
they validate total number of owned buckets and then send requests to
Stanchion. But bucket creation is a rare operation, this won't happen
so frequently.
The case where this commit can't prevent growth of an user object is,
when buckets are frequently created and deleted; in that case the user
record may have many deleted bucket records. But that will be pruned.
Addressed by #927