-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Filestore] Implement sharding for directories #2674
Comments
TODO: safety check (if our guids are not gUids) - check that NodeAttr in TCreateNodeResponse from shard matches the corresponding TCreateNodeRequest UPD: done |
RenameNode implementation plan Important rules:
RenameNodeRequest will be sent from TStorageServiceActor to the shard in charge of the source directory. This shard will play the role of the transaction coordinator. If both source and destination directories are managed by the same tablet, RenameNode works in the same way it works right now. It's a simple way to achieve 2 things:
Else => destination is managed by another shard. The logic is then like this:
That seems to be it. |
TODOs left after #2838:
|
Right now sharding is done for regular inodes (i.e. files). Directories, symlinks, etc. are managed by a single tablet per single logical filesystem. It's a bottleneck for:
For example, regarding file creation - we are limited by numbers around 5-10k creations per second per single logical filesystem.
We need to implement sharding for directories. It will lead to the need to implement something like distributed transactions - most notably for the rename operation: either source directory shard or target directory shard may be unable to perform the operation and we need to either commit the operation in both source and target or not commit it anywhere. The most straightforward way to implement it is via 2PC. Considering the fact that all of our transactions will have at most 2 participants and the fact that each of those participants is reliable and has access to persistent storage, we can assign transaction coordinator role to one of the participants (e.g. source directory shard). Then 2PC actually transforms into something which is pretty simple to implement:
The text was updated successfully, but these errors were encountered: