apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
164 stars 86 forks source link

Bundle state inconsistency in case of update failure #563

Closed PengZheng closed 1 year ago

PengZheng commented 1 year ago

When entering celix_framework_bundleEntry_refreshBundleEntry, bundle is in resolved state. If any of the steps in celix_framework_bundleEntry_refreshBundleEntry fails, bundle state should be updated accordingly. Currently this is not the case.

Note that to fix this issue, #557 should also be considered. The ultimate goal is to fully support bundle update, and thus the following warning should be eliminated:

    fw_log(fw->logger, CELIX_LOG_LEVEL_WARNING, "Update bundle is not yet fully supported. Use at your own risk.");
PengZheng commented 1 year ago

Once #556 is resolved, the current implementation of uninstall can be renamed to "unload". Then update can be implemented as unload followed by install. This way, a refresh bundle is loaded from storage without any state inconsistency issues.

Additional benefits include: