You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to allow building the Shardmanager without defining the actual shards it will run later so we can dynamically let those match our needs when we think it is safe to do so.
Current Behaviour
A) We dont define any shards
varsm = DefaultShardManagerBuilder
.createLight("TOUCAN")
.setShardsTotal(totalshards) // lets say its 5
.build(false);
When calling sm.start() the Shardmanager will proceed to start all shards from 0 to 4 in order. When calling start(int) with a shardid the same behaviour can be observed ignoring our selection.
B) We define some shards
varsm = DefaultShardManagerBuilder
.createLight("TOUCAN")
.setShardsTotal(totalshards) // lets say its 5
.setShards(shards) // 0, 2, 3
.build(false);
When calling sm.start() the Shardmanager will proceed to start all shards specified in order. When calling start(int) with a shardid the same behaviour can be observed ignoring our selection.
Expected Behaviour
A) We dont define any shards
No shards will be started when calling sm.start() which will require an explicit definition to use the auto sharding feature. Alternatively the current behaviour of starting all shards might remain tho this might feel a bit inconsistent then. Only the shard specified will be started when calling sm.start(int).
B) We define some shards
No shards will be started when calling sm.start() which will require an explicit definition to use the auto sharding feature. Alternatively the current behaviour of starting all defined shards might remain tho this might feel a bit inconsistent then. Only the shard specified will be started when calling sm.start(int).
Current Workaround
Define only the lowest shardid you would intend to start within the builder. When the shards are supposed to login, beginn calling start(int) starting with the lowest id. It is important that the specified id is the lowest and the same in both cases. As the shardmanager will ignore the id for the initial start, we might start the wrong shard without any simple ways to knowing this. Also this allows for easy sorting which makes it a bit less prone to breaking.
varsm = DefaultShardManagerBuilder
.createLight("TOUCAN")
.setShardsTotal(totalshards) // lets say its 5
.setShards(0) // 0, (2, 3)
.build(false);
...
sm.start(0)
sm.start(2)
sm.start(3)
The text was updated successfully, but these errors were encountered:
Horstexplorer
changed the title
Shardmanager - Dynaming shard startup
Shardmanager - Dynaminc shard startup
Aug 2, 2021
Horstexplorer
changed the title
Shardmanager - Dynaminc shard startup
Shardmanager - Dynamic shard startup
Aug 2, 2021
General Troubleshooting
Feature Request
Adjust the Shardmanager to allow for dynamic clustering without fancy workarounds
Example Use-Case
Feature request originating from chat in #1721
It would be great to allow building the Shardmanager without defining the actual shards it will run later so we can dynamically let those match our needs when we think it is safe to do so.
Current Behaviour
A) We dont define any shards
When calling
sm.start()
the Shardmanager will proceed to start all shards from 0 to 4 in order. When callingstart(int)
with a shardid the same behaviour can be observed ignoring our selection.B) We define some shards
When calling
sm.start()
the Shardmanager will proceed to start all shards specified in order. When callingstart(int)
with a shardid the same behaviour can be observed ignoring our selection.Expected Behaviour
A) We dont define any shards
No shards will be started when calling
sm.start()
which will require an explicit definition to use the auto sharding feature. Alternatively the current behaviour of starting all shards might remain tho this might feel a bit inconsistent then. Only the shard specified will be started when callingsm.start(int)
.B) We define some shards
No shards will be started when calling
sm.start()
which will require an explicit definition to use the auto sharding feature. Alternatively the current behaviour of starting all defined shards might remain tho this might feel a bit inconsistent then. Only the shard specified will be started when callingsm.start(int)
.Current Workaround
Define only the lowest shardid you would intend to start within the builder. When the shards are supposed to login, beginn calling start(int) starting with the lowest id. It is important that the specified id is the lowest and the same in both cases. As the shardmanager will ignore the id for the initial start, we might start the wrong shard without any simple ways to knowing this. Also this allows for easy sorting which makes it a bit less prone to breaking.
The text was updated successfully, but these errors were encountered: