opencurve / curve

Curve is a sandbox project hosted by the CNCF Foundation. It's cloud-native, high-performance, and easy to operate. Curve is an open-source distributed storage system for block and shared file storage.
https://opencurve.io
Apache License 2.0
2.34k stars 526 forks source link

[curvefs] curvefs metadata operations changed to transaction processing #2044

Open cw123 opened 2 years ago

cw123 commented 2 years ago

For the current curvefs metadata operations, only the rename operation implements transactions, and other metadata operations are implemented in non-transactional ways. Hopefully other metadata operations can be changed to transactional.

当前curvefs的元数据操作,只有rename操作实现了事务,其他的元数据操作都是非事务的方式实现。希望其他的元数据操作都能改成事务的方式。

The implementation of the metadata operation of curve is in: curve的元数据操作的实现在 :

https://github.com/opencurve/curve/blob/master/curvefs/src/client/fuse_client.cpp

The Rename operation implements the transaction.

其中 Rename操作实现了事务。

CURVEFS_ERROR FuseClient::FuseOpRename(fuse_req_t req, fuse_ino_t parent,
                                       const char *name, fuse_ino_t newparent,
                                       const char *newname)

Hope that other requests can also be implemented in a transactional manner. Instead of completing all the interface transformations at one time, you can choose one or two interfaces to implement first.

希望把其他的请求,也能改成事务的方式实现。不用一次完成全部接口改造,可挑选一至两个接口先实现。

 CURVEFS_ERROR FuseOpCreate(fuse_req_t req, fuse_ino_t parent,
                                       const char* name, mode_t mode,
                                       struct fuse_file_info* fi,
                                       fuse_entry_param* e) = 0;

CURVEFS_ERROR FuseOpMkNod(fuse_req_t req, fuse_ino_t parent,
                                      const char* name, mode_t mode, dev_t rdev,
                                      fuse_entry_param* e) = 0;

CURVEFS_ERROR FuseOpMkDir(fuse_req_t req, fuse_ino_t parent,
                                      const char* name, mode_t mode,
                                      fuse_entry_param* e);

CURVEFS_ERROR FuseOpUnlink(fuse_req_t req, fuse_ino_t parent,
                                       const char* name) = 0;

CURVEFS_ERROR FuseOpRmDir(fuse_req_t req, fuse_ino_t parent,
                                      const char* name);
WyattJia commented 2 years ago

assign to me.

zhanghuidinah commented 2 years ago

/assign @WyattJia

wuhongsong commented 2 years ago

@WyattJia Are you having some trouble? If so, please let us know so that we can communicate together

wuhongsong commented 1 year ago

feel free to continue this issue @WyattJia

WyattJia commented 1 year ago

Sure, I'm just not sure whether to use the new percolator transaction optimization or the old serial transaction optimization.

wuhongsong commented 1 year ago

@cw123 have a look?

cw123 commented 1 year ago

@Wine93

jiengup commented 1 year ago

Is this issue reopened? Can I work on this issue? @cw123 @ilixiaocui

ilixiaocui commented 1 year ago

Is this issue reopened? Can I work on this issue? @cw123 @ilixiaocui

Still in progress, welcome!

Cyber-SiKu commented 1 year ago

@jiengup Are you still going on?

jiengup commented 1 year ago

@jiengup Are you still going on?

Yes, but found it a little hard for me. I'm wondering if there are some tips for this issue.

jiengup commented 1 year ago

@jiengup Are you still going on?

Yes, but found it a little hard for me. I'm wondering if there are some tips for this issue.

Sorry I can't do this, I will unassign myself.

UniverseParticle commented 1 year ago

assign to me.

Ziy1-Tan commented 1 year ago

Hi! Is there any additional context for this issue besides https://github.com/opencurve/curve/blob/master/docs/cn/curvefs_improve_rename_design.md? I found that

1) The process of transaction processing is very long; 2) The docs seems to only mention design and not about The code implementation content is less.

Does anyone still work on them now?