Repository navigation
feat(server): socket migration across shard - #2476
Conversation
3d1ec56 to
45a570f
Compare
429287e to
c1a50f4
Compare
add handler result to control lifecycle add the point failed to login at the point the connection hanging, wait for the new recover tcp stream convert handle_request & handle_event take &Rc<IggyShard> in order to spawn a connection inside the message handler stucking with the single client polling tests need to debug test background_graceful_shutdown all tests pass now self review
a6ba7f1 to
198a24a
Compare
hubcio
left a comment
There was a problem hiding this comment.
overall, design in this PR is sound, however i'd like you to consider: all 50+ handlers now return HandlerResult but only SendMessages use Migrated. have you thought about adding IggyError::ConnectionMigrated(to_shard) and catch it in connection handler? this would greatly reduce changed files in the PR
I actually did that in the first place, but on second thought, this is not an error, so I have to change all of the handler results. I would be happy to change it if you prefer to treat it as an error |
I mean your approach does make sense... Lets wait for other core devs opinion. |
|
@hubcio I have resolved all comments and fixed the C# tests |
This PR addressing #2386
Enable TCP socket migration across shards. When a client sends messages to the wrong shard, migrate the socket to the correct shard to eliminate cross-shard forwarding overhead