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.32k stars 521 forks source link

report nlink <= 0 when run tpc-ds test #2998

Open madstorage opened 5 months ago

madstorage commented 5 months ago

Describe the bug (描述bug)

when run tpc-ds test, the rename operator return failed: -1, internal error!

the log print: Unlink find nlink <= 0, nlink =

To Reproduce (复现方法)

multi client do rename dir operator parallel, the nlink of parent dir would bigger than expected, or do rename dir and create dir parallel, the nlink of parent dir would less than expected.

Expected behavior (期望行为)

nlink of parent dir, should correspond to it's sub dir after parallel operator!

Versions (各种版本)

OS: ubuntu22 Compiler: default branch: release2.7 commit id: b1254187d18f53c6235a9e55d013645f8e35066d

Additional context/screenshots (更多上下文/截图)

after rename operator, on client side to unlink src parent nlink is read-modify-write, which is not an atomic operator, conflict with create/remove dir or other client rename!

494995b51c862815cf7d05619db4186f 企业微信截图_17115214947443