forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: allow extending existing verbs in backwards compatable way
This patch allows adding (but not removing or replacing) additional parameters to existing verbs or return additional values from rpc handlers. Suppose there is a verb: (1) future<int> rpc_call(long, int) this patch allow it to be modified to be: (2) future<int, rpc::optional<long>> rpc_call(long, int, rpc::optional<char>) and be used against binary versions that had definition 1. If older version is a client then during the call rpc::optional<char> will be disengaged since older version does not send value for the parameter. If older version is a server it will ignore value sent for rpc::optional<char> and call the callback with old signature. Extending return value works in a similar way.
- Loading branch information
Gleb Natapov
committed
Dec 27, 2015
1 parent
c12e683
commit e8afec0
Showing
3 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters