curve icon indicating copy to clipboard operation
curve copied to clipboard

[feature] cbd support more flexible volume size

Open h0hmj opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)

current curvebs volume size must larger than 10GB. it's not flexiable, we need support smaller ones

Describe the solution you'd like (描述你期望的解决方法)

tbd

Describe alternatives you've considered (描述你想到的折衷方案)

tbd

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

h0hmj avatar Jun 27 '23 03:06 h0hmj

current segment size is fixed to 1GB, which means configurable minimal size is 1G maybe

we can make logic like size < 1GB => use segment size 64MB size > 1GB => use segment size 1GB

h0hmj avatar Jun 30 '23 03:06 h0hmj

I want to try!

zztaki avatar Dec 22 '23 06:12 zztaki

My main concern is with the test code. In test/mds/nameserver2/curvefs_test.cpp, they are all formulated according to the original logic. If this flexible feature is added, it seems that it will harm the original test code.

Do I need to completely modify the test logic to match the new flexible features?

I hope I can get your help! :) @h0hmj

zztaki avatar Dec 22 '23 08:12 zztaki

@zztaki @wu-hanqing is familiar with curvebs source code, maybe he can help you and give you some hints.

h0hmj avatar Dec 25 '23 10:12 h0hmj

My main concern is with the test code. In test/mds/nameserver2/curvefs_test.cpp, they are all formulated according to the original logic. If this flexible feature is added, it seems that it will harm the original test code.

Do I need to completely modify the test logic to match the new flexible features?

I hope I can get your help! :) @h0hmj

Modifying test code should be unavoidable.

In addition to @h0hmj's proposal, can we still keep 1GB segment? and introduce a partial segment which is smaller than 1GB. The partial segment will only be in the last part of the volume, and we can expand this partial segment into a full segment in case of need.

wu-hanqing avatar Dec 26 '23 03:12 wu-hanqing

My main concern is with the test code. In test/mds/nameserver2/curvefs_test.cpp, they are all formulated according to the original logic. If this flexible feature is added, it seems that it will harm the original test code. Do I need to completely modify the test logic to match the new flexible features? I hope I can get your help! :) @h0hmj

Modifying test code should be unavoidable.

In addition to @h0hmj's proposal, can we still keep 1GB segment? and introduce a partial segment which is smaller than 1GB. The partial segment will only be in the last part of the volume, and we can expand this partial segment into a full segment in case of need.

Attractive proposal! When it is implemented, our volume larger than 1GB can also have MB level granularity. But I'm still a little confused about the merging of partial segments. Anyway, step by step, maybe I can implement the previous proposal first.

Thank you for your replies @h0hmj @wu-hanqing . I get your suggestion that I can modify the test code :)

zztaki avatar Dec 26 '23 03:12 zztaki