1F - Enforced bucket-level quotas in RGW¶
The live pad can be found here: [pad]
Summit Snapshot¶Coding tasks
- Modify bucket metadata structure
- Create admin interfaces to modify new bucket metadata info
- Enforce limit on the bucket index (hard limit)
- Prevent writes to enforced bucket if hard limit exceeded
- Implement bucket info cache
- Update bucket info periodically for all buckets
- Update bucket info synchronously for specific buckets if exceeded soft limit
- Document new admin interfaces, API
- Document semantics
507 Insufficient Storage (WebDAV; RFC 4918) — maybe we can use this for the return code?
The current design has a race condition with the soft quotas, as Li Wang points out. Greg suggests that we could have a post-check on the bucket index return an error code if the user has exceeded their quota, and the gateway can then return an error to the user and schedule the already -uploaded data for immediate garbage collection. (#3) This also means we can implement the soft quota work at a later time to provide an earlier (friendlier) return to clients.
Well, that means we have to do something like rollback? Like the journal file system does?
This is already supported implicitly given the way we do our atomic object switches.