Skip to content
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] Hardlink creation in sharded filesystems is not atomic #2667

Open
qkrorlqr opened this issue Dec 10, 2024 · 0 comments
Open

[Filestore] Hardlink creation in sharded filesystems is not atomic #2667

qkrorlqr opened this issue Dec 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working filestore Add this label to run only cloud/filestore build and tests on PR

Comments

@qkrorlqr
Copy link
Collaborator

Hardlink creation in sharded filesystems is done via this actor:

class TLinkActor final: public TActorBootstrapped<TLinkActor>

It first creates a hardlink in the shard which is responsible for the linked node and then creates a link in the main tablet. This whole operation is not atomic - the first step may succeed and the second may fail after that. We need to reimplement it in a way similar to regular node creation - first step should add a request to OpLog in the same transaction with the other logic of this step and the second step should be retried until it either succeeds or fails with a non-retriable error. The difference with regular node creation is that here the order is reversed - we first create a node in the shard and, second, we make modifications to the main filesystem. Those modifications may fail so extra logic may be needed - i.e. rollback of the first step in shard.

@qkrorlqr qkrorlqr added the filestore Add this label to run only cloud/filestore build and tests on PR label Dec 10, 2024
@qkrorlqr qkrorlqr added the bug Something isn't working label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working filestore Add this label to run only cloud/filestore build and tests on PR
Projects
None yet
Development

No branches or pull requests

2 participants