-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: deprecating named sharding #2723
Conversation
This PR may contain changes to configuration options of one of the apps. If you are introducing a breaking change (i.e. the set of options in latest release would no longer be applicable) make sure the original option is preserved with a deprecation note for 2 following releases before it is actually removed. Please also make sure the label |
You can find the image built from this PR at
Built from cd9ac42 |
You can find the image built from this PR at
Built from cd9ac42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for it! 🥳
I'm not approving yet because it is in draft
Cheers
@@ -300,12 +300,13 @@ type WakuNodeConf* = object | |||
|
|||
pubsubTopics* {. | |||
desc: "Default pubsub topic to subscribe to. Argument may be repeated.", | |||
defaultValue: @[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we mark this pubsubTopic
config attribute as deprecated? In that case, we will need to keep it for two more versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the idea is to deprecate it and stop creating confusion/overlap between pubsubTopic
and shard
.
So we will have to keep it for 2 more releases (announcing the deprecation in the release notes) and afterwards create a new PR deprecating it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add Deprecated
in the desc
?
b512631
to
2f36607
Compare
Should we take this opportunity to remove the usage of My idea would be to replace WDYT? |
waku/factory/node_factory.nim
Outdated
@@ -117,10 +117,16 @@ proc setupProtocols( | |||
## Optionally include persistent message storage. | |||
## No protocols are started yet. | |||
|
|||
var shardCount: uint32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this. imho pubsubTopics.len
shall be always >0
?
pubsubTopics
will be deprecated soon and this will be eg a cli flag shard-count
or network-shards
. but that's for another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True! That was done because it made everything work better when I tested not setting anything in pubsub-topic
and only setting shard
.
But if we currently need to use pubsub-topic
to list all the topics in the network, then it makes sense to add the logic similar to this in the next PR, the one deprecating pubsub-topic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was done because it made everything work better when I tested not setting anything in pubsub-topic and only setting shard.
mm IMHO pubsub-topic
has to be always set. It could be a default value (like when using clusterid=0 or 1) but it has to be set somewhere.
@@ -96,12 +96,6 @@ proc init*(T: type Waku, conf: WakuNodeConf): Result[Waku, string] = | |||
|
|||
case confCopy.clusterId | |||
|
|||
# cluster-id=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removing cluster-id=0 configuration?
maybe we should keep it but with just 1 shard? for backwards compatibility? unsure though if someone is using it.
I mean, cluster-id=0 currently was a single named "shard" (default pubsub topic). From an app PoV that is equivalent to autosharding with a single shard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that after deprecating named sharding, cluster 0 was going to stop being a "special case".
Is there's any reason why we would want to keep the configuration of cluster 0 hardcoded? Once named sharding is deprecated, there won't be backward compatibility in any case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im ok with removing it. you are right with cluster 0 not being a special case anymore. But think also about the "known clusters" concept. Cluster configuration is not only about topics but also bootstrap nodes, validation strategy, etc.
so the question here is. do we want cluster-id=0 to be a "known cluster" with some specific configuration that people can use, or we don't care about that? imho nope, i would care only about TWN=1
but ccing @jm-clius
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I think we should only care about TWN=1. Everything else is (equally) undefined.
I like the idea! I think it's better to do it in a separate PR once named sharding is deprecated so we don't mix different things and make the PR too big |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long overdue! Thanks.
@@ -300,12 +300,13 @@ type WakuNodeConf* = object | |||
|
|||
pubsubTopics* {. | |||
desc: "Default pubsub topic to subscribe to. Argument may be repeated.", | |||
defaultValue: @[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add Deprecated
in the desc
?
How? Like this?
We can, although I will remove the |
65cb4f5
to
32675a8
Compare
32675a8
to
519a119
Compare
You can find the image built from this PR at
Built from 71e06e0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks! 💯
61c7815
to
4565042
Compare
Description
Deprecating named sharding.
We won't allow further usage of named sharding and the default pubsub topic will be replaced by each cluster's
0
shard.Another PR will follow in which we will deprecate the
--pubsub-topic
CLI configuration in favor ofshard
Note
This PR will be merged after having announced the deprecation of named sharding during the next two releases (it will enter to
v0.31.0
). However, the general approach should be reviewed from now.Issue
closes #2772