[sheepdog] RFC: update protocol version or redesign struct sd_node
Liu Yuan
namei.unix at gmail.com
Tue Jan 14 04:34:03 CET 2014
On Tue, Jan 14, 2014 at 12:00:33PM +0900, Hitoshi Mitake wrote:
>
> The commit 9ea90be39e9d (sheep: use rbtree to manage struct sd_node)
> changes struct sd_node. So the master branch isn't compatible with
> v0.7.x because it affects the format of GET_NODE_LIST's returned
> buffer. Every dog command which has a flag CMD_NEED_NODELIST cannot
> work (users see nodes have IPv6 addresses).
Why you need v0.7.x dog to communite with latest sheep? There are many problems
other than imcompatibility of struct sd_node
> The affection is very serious so I propose either of the below two
> changes:
serious for what usage which can't be workaround and the only solution is to
adopt following 2?
> 1. change protocol version and forbid communication between 0.7.x dog
> and the latest sheep
>
> 2. change struct sd_node and exclude struct rb_node rb; from the
> members
>
> I think 2 would be a better option. sd_node is a data structure which
> can be exchanged via network and such a data structure shouldn't have
> pointers as its members. Current sd_node is really ugly.
Talk is cheap, feel free to post a patch that fullfill current features:
1. allow 6k+ nodes (100k+ vnodes) manage effeciently (at least don't degrade)
2. don't break current usage (we already have a production cluster based on
current latest master, so your patch should work with current data without
re-format or any tricky upgrade. We want, at least for v0.8.x
series, we can get a smooth update for furture.
There are many ugliness in sheep and also many existing problems. My advice is
solve problems at first and don't invest time on something that changing core
code just for something you think of beatiful. Chanign coring is always at risk
to introduce new bugs and need time to stablize. I introduce rb_tree to manage
vnodes because we have to use it to manage more than 10 thousands of vnodes, which
old array approach can't handle well. So what is your motivation besides 'ugliness'?
Thanks
Yuan
More information about the sheepdog
mailing list