ydb-platform / nbs

Network Block & File Store
Apache License 2.0
54 stars 21 forks source link

[Filestore] AddData should update inode size #1519

Closed debnatkh closed 2 months ago

debnatkh commented 3 months ago

Currently, the old data path updates file size and CommitId:

https://github.com/ydb-platform/nbs/blob/e88c38a188ada65b8e0130da37d49973b4d138ee/cloud/filestore/libs/storage/tablet/tablet_actor_writedata.cpp#L303-L309

The same thing must happen to the three-stage-write datapath. Currently, the Execute stage of the transaction is empty:

https://github.com/ydb-platform/nbs/blob/e88c38a188ada65b8e0130da37d49973b4d138ee/cloud/filestore/libs/storage/tablet/tablet_actor_adddata.cpp#L105-L111

debnatkh commented 3 months ago

There actually does not seem to be any problems

The UpdateNode in tablet_actor_writedata.cpp seems to be redundant for aligned, non-fresh data, as the same modifications are made here:

https://github.com/ydb-platform/nbs/blob/b7ae81966956d1dba039761b3acbf5bb45fe0fd8/cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp#L321-L327