-
Notifications
You must be signed in to change notification settings - Fork 852
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
Implement a dynamic reload mechanism for Besu plugins. #261
Implement a dynamic reload mechanism for Besu plugins. #261
Conversation
Signed-off-by: Edward Evans <[email protected]> Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
Is there complexity around reloading the encrypted-storage plugin? I.e. do all threads in besu need to stop before the plugin is reloaded? |
I'm somewhat confused about this - we don't, as far as I know, have any built-in way to change a plugin's configuration at runtime (the only config options we provide are CLI args), so why do we need to have plugins reload their config when it won't have changed? If plugins have to provide their own way to update their config, why wouldn't they just automatically reload when it changes? I'm guessing I'm just missing some context but it's probably worth adding that info to the PR description for the historical record (particularly for when someone tries to document this). |
In the lifecycle we had in mind you can call multiple times reload method between start and stop. The idea is to do this operation on the fly without stopping the plugin. Also this operation does not make sense for all plugins. For instance i think the encrypted-storage might be out of scope for the reloading. |
Agreed, the description does not provide enough context. So we have some users using Eventeum and they are not happy with it because they have to add a MongoDB instance into their infrastructure. It is an additional component to maintain and to administrate. Consequently we are extending our event stream plugin to add an underlying persistent DB using the |
…i-dynamic-reload-config Signed-off-by: Abdelhamid Bakhta <[email protected]> # Conflicts: # ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/AdminJsonRpcMethods.java
Thanks for the context. I can see how a reload trigger would be useful there. To me it does sound like it should just be a feature of the specific plugin, not a change to the plugin lifecycle. Mostly I just think it would be a better user experience to have a reload API specific to the plugin - especially as in the future plugins might have multiple things they could reload or other reload options etc. I'm not strongly opinionated on that and don't have all the background. I can see that multiple plugins might want to reload and this approach would work for that, so I'm happy to go along with whatever you decide. |
I think i will wait after until after holidays so we have the opportunity to discuss more about the next steps. |
…i-dynamic-reload-config Signed-off-by: Abdelhamid Bakhta <[email protected]>
...a/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java
Outdated
Show resolved
Hide resolved
besu/src/main/java/org/hyperledger/besu/services/BesuPluginContextImpl.java
Show resolved
Hide resolved
Signed-off-by: Abdelhamid Bakhta <[email protected]>
...a/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java
Outdated
Show resolved
Hide resolved
...a/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Abdelhamid Bakhta <[email protected]>
...a/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Abdelhamid Bakhta <[email protected]>
…i-dynamic-reload-config Signed-off-by: Abdelhamid Bakhta <[email protected]> # Conflicts: # ethereum/api/src/integration-test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcTestMethodsFactory.java
* Implement a dynamic reload mechanism for Besu plugins. - Added `reloadConfiguration` method in `plugin-api`. - Added `admin_reloadPlugin` RPC endpoint. - if the first parameter is specified the API will attempt to reload the individual plugin if found in the map. - if no parameter is specified the API will attempt to reload all plugins. - Added method in `BesuPluginContextImpl` to retrieve a map of named plugins. Signed-off-by: Abdelhamid Bakhta <[email protected]>
* Implement a dynamic reload mechanism for Besu plugins. - Added `reloadConfiguration` method in `plugin-api`. - Added `admin_reloadPlugin` RPC endpoint. - if the first parameter is specified the API will attempt to reload the individual plugin if found in the map. - if no parameter is specified the API will attempt to reload all plugins. - Added method in `BesuPluginContextImpl` to retrieve a map of named plugins. Signed-off-by: Abdelhamid Bakhta <[email protected]> Signed-off-by: edwardmack <[email protected]>
PR description
Changes
reloadConfiguration
method inplugin-api
.admin_reloadPlugin
RPC endpoint.BesuPluginContextImpl
to retrieve a map of named plugins.TODO
Signed-off-by: Abdelhamid Bakhta [email protected]
Fixed Issue(s)
fixes BESU-162