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
backend plugin #2963
Comments
Thank you for the summary! |
@vLesk What is the current status? |
As far as I can see, the implementation should be done (the |
Thank you, it would be so great to get this finished. 💖 It is really one of the core features of Elektra and we constantly run into the too many plugin problem. The ensurePluginUnmounted is not a big deal, as discussed before. Maybe you can throw a not_implemented error there? |
Squashed version of: decisions: added decision for backend plugin Discussed in ElektraInitiative#2963 backend: added basic files for backend plugin Discussed in ElektraInitiative#2963 plugin: added the modules keyset to plugins The keyset has been added to the Plugin struct and elektraPluginOpen. Discussed in ElektraInitiative#2969. backend: implemented elektraBackendOpen Discussed in ElektraInitiative#2969. backend: implemented elektraBackendGet Discussed in ElektraInitiative#2969. documentation: updated documentation reflecting the changed mount point configuration Changed documents: - architecture.md - plugins-ordering.md - README.md in src/plugins Discussed in ElektraInitiative#2969. backend: made basic implementation of elektraBackendSet, elektraBackendCommit and elektraBackendError Discussed in ElektraInitiative#2969. backend: Added implications to decision for the backend plugin Discussed in ElektraInitiative#2969. documentation: Modified role names in plugins-ordering Discussed in ElektraInitiative#2969. kdbprivate: Added definitions of new plugin positions, still need to remove old ones Discussed in ElektraInitiative#2969. cpp tools: made basic modifications to conform with new backend plugin Still incomplete, the tests do not pass yet. Discussed in ElektraInitiative#2969. testtool_backend: modified tests to conform to new backend configuration Discussed in ElektraInitiative#2969. backend: modifications to clear compiler errors, moved plugin position definitions to kdbprivate Discussed in ElektraInitiative#2969. backend: modified plugin functions to be called once per plugin role Discussed in ElektraInitiative#2969. backend: changed function calls to match new api Revert "cpp tools: made basic modifications to conform with new backend plugin" This reverts commit 63a10fe. tools: modified libs/tools to be compatible with the new backend plugin Discussed in ElektraInitiative#2969. backend: changed back the names of the roles of a backend Discussed in ElektraInitiative#2969. backend: changed back the names of the roles in a backend Discussed in ElektraInitiative#2969. kdbprivate: modified functions and structs to support the backend plugin Discussed in ElektraInitiative#2969. version: implemented external version plugin to work with the backend plugin Related to ElektraInitiative#2969. missing: implemented external missing plugin for compatibility with backend plugin Related to ElektraInitiative#2969. backend.c: modified backend functions to conform with new backend plugin and removed unneeded functions Discussed in ElektraInitiative#2969. missing: reformatted code style version: reformatted code style backend: restyled code Related to ElektraInitiative#2969. tools: restyled code Related to ElektraInitiative#2969. backend: restyled code Related to ElektraInitiative#2969. backend: first modifications for compatibility with the backend plugin, more to come Discussed in ElektraInitiative#2969. mount: modifications for compatibility with the backend plugin Discussed in ElektraInitiative#2969. plugin.c: restyled code Related to ElektraInitiative#2969. split: modifications for compatibility with backend plugin Related to ElektraInitiative#2969. trie: modifications for compatibility with the backend plugin Discussed in ElektraInitiative#2969. plugin.c: removed unnecessary functions Discussed in ElektraInitiative#2969. split: moved keyset sizes from backend to split and modified backendUpdateSize Discussed in ElektraInitiative#2969. kdbEnsure: commented out the ensurePluginUnmounted function until it is made compatible with the backend plugin Discussed in ElektraInitiative#2969. kdb: modified kdb functions to use the backend plugin Discussed in ElektraInitiative#2969. tests.c: modified tests to support backend plugin and new split structure Discussed in ElektraInitiative#2969. backend: modified test_backend and moved it to the backend plugin Related to ElektraInitiative#2969. backend: partially implemented tests, commented out places in tests that did not work Discussed in ElektraInitiative#2969. backend: minor debugging changes Discussed in ElektraInitiative#2969. testmod_backend: finished tests Discussed in ElektraInitiative#2969. umount: modified tests to use new configuration Discussed in ElektraInitiative#2969 backend: changed mount point of default backend Part of ElektraInitiative#2969 backend: fixed bug in elektraBackendClose which called elektraPluginClose on the wrong plugin array testmod_backend: partially fixed memory leaks backend: finished fixing memory leaks Based on ElektraInitiative#2969 backend: fix some memory problems backend: fixed wrong arguments when calling kdbGet Based on ElektraInitiative#2963 backend: fixed bug where the wrong plugin was passed to plugin function calls reformatted code mount: added check not to call backendOpenModules for the backend plugin itself Based on ElektraInitiative#2969 backend: Made kdbGet return ELEKTRA_PLUGIN_STATUS_SUCCESS in the resolver phase if there is no resolver Based on ElektraInitiative#2969 backend, kdb: reformatted code Based on ElektraInitiative#2969 cache: disable cache mount
Squashed version of: decisions: added decision for backend plugin Discussed in ElektraInitiative#2963 backend: added basic files for backend plugin Discussed in ElektraInitiative#2963 plugin: added the modules keyset to plugins The keyset has been added to the Plugin struct and elektraPluginOpen. Discussed in ElektraInitiative#2969. backend: implemented elektraBackendOpen Discussed in ElektraInitiative#2969. backend: implemented elektraBackendGet Discussed in ElektraInitiative#2969. documentation: updated documentation reflecting the changed mount point configuration Changed documents: - architecture.md - plugins-ordering.md - README.md in src/plugins Discussed in ElektraInitiative#2969. backend: made basic implementation of elektraBackendSet, elektraBackendCommit and elektraBackendError Discussed in ElektraInitiative#2969. backend: Added implications to decision for the backend plugin Discussed in ElektraInitiative#2969. documentation: Modified role names in plugins-ordering Discussed in ElektraInitiative#2969. kdbprivate: Added definitions of new plugin positions, still need to remove old ones Discussed in ElektraInitiative#2969. cpp tools: made basic modifications to conform with new backend plugin Still incomplete, the tests do not pass yet. Discussed in ElektraInitiative#2969. testtool_backend: modified tests to conform to new backend configuration Discussed in ElektraInitiative#2969. backend: modifications to clear compiler errors, moved plugin position definitions to kdbprivate Discussed in ElektraInitiative#2969. backend: modified plugin functions to be called once per plugin role Discussed in ElektraInitiative#2969. backend: changed function calls to match new api Revert "cpp tools: made basic modifications to conform with new backend plugin" This reverts commit 63a10fe. tools: modified libs/tools to be compatible with the new backend plugin Discussed in ElektraInitiative#2969. backend: changed back the names of the roles of a backend Discussed in ElektraInitiative#2969. backend: changed back the names of the roles in a backend Discussed in ElektraInitiative#2969. kdbprivate: modified functions and structs to support the backend plugin Discussed in ElektraInitiative#2969. version: implemented external version plugin to work with the backend plugin Related to ElektraInitiative#2969. missing: implemented external missing plugin for compatibility with backend plugin Related to ElektraInitiative#2969. backend.c: modified backend functions to conform with new backend plugin and removed unneeded functions Discussed in ElektraInitiative#2969. missing: reformatted code style version: reformatted code style backend: restyled code Related to ElektraInitiative#2969. tools: restyled code Related to ElektraInitiative#2969. backend: restyled code Related to ElektraInitiative#2969. backend: first modifications for compatibility with the backend plugin, more to come Discussed in ElektraInitiative#2969. mount: modifications for compatibility with the backend plugin Discussed in ElektraInitiative#2969. plugin.c: restyled code Related to ElektraInitiative#2969. split: modifications for compatibility with backend plugin Related to ElektraInitiative#2969. trie: modifications for compatibility with the backend plugin Discussed in ElektraInitiative#2969. plugin.c: removed unnecessary functions Discussed in ElektraInitiative#2969. split: moved keyset sizes from backend to split and modified backendUpdateSize Discussed in ElektraInitiative#2969. kdbEnsure: commented out the ensurePluginUnmounted function until it is made compatible with the backend plugin Discussed in ElektraInitiative#2969. kdb: modified kdb functions to use the backend plugin Discussed in ElektraInitiative#2969. tests.c: modified tests to support backend plugin and new split structure Discussed in ElektraInitiative#2969. backend: modified test_backend and moved it to the backend plugin Related to ElektraInitiative#2969. backend: partially implemented tests, commented out places in tests that did not work Discussed in ElektraInitiative#2969. backend: minor debugging changes Discussed in ElektraInitiative#2969. testmod_backend: finished tests Discussed in ElektraInitiative#2969. umount: modified tests to use new configuration Discussed in ElektraInitiative#2969 backend: changed mount point of default backend Part of ElektraInitiative#2969 backend: fixed bug in elektraBackendClose which called elektraPluginClose on the wrong plugin array testmod_backend: partially fixed memory leaks backend: finished fixing memory leaks Based on ElektraInitiative#2969 backend: fix some memory problems backend: fixed wrong arguments when calling kdbGet Based on ElektraInitiative#2963 backend: fixed bug where the wrong plugin was passed to plugin function calls reformatted code mount: added check not to call backendOpenModules for the backend plugin itself Based on ElektraInitiative#2969 backend: Made kdbGet return ELEKTRA_PLUGIN_STATUS_SUCCESS in the resolver phase if there is no resolver Based on ElektraInitiative#2969 backend, kdb: reformatted code Based on ElektraInitiative#2969 cache: disable cache mount
Squashed version of: decisions: added decision for backend plugin Discussed in ElektraInitiative#2963 backend: added basic files for backend plugin Discussed in ElektraInitiative#2963 plugin: added the modules keyset to plugins The keyset has been added to the Plugin struct and elektraPluginOpen. Discussed in ElektraInitiative#2969. backend: implemented elektraBackendOpen Discussed in ElektraInitiative#2969. backend: implemented elektraBackendGet Discussed in ElektraInitiative#2969. documentation: updated documentation reflecting the changed mount point configuration Changed documents: - architecture.md - plugins-ordering.md - README.md in src/plugins Discussed in ElektraInitiative#2969. backend: made basic implementation of elektraBackendSet, elektraBackendCommit and elektraBackendError Discussed in ElektraInitiative#2969. backend: Added implications to decision for the backend plugin Discussed in ElektraInitiative#2969. documentation: Modified role names in plugins-ordering Discussed in ElektraInitiative#2969. kdbprivate: Added definitions of new plugin positions, still need to remove old ones Discussed in ElektraInitiative#2969. cpp tools: made basic modifications to conform with new backend plugin Still incomplete, the tests do not pass yet. Discussed in ElektraInitiative#2969. testtool_backend: modified tests to conform to new backend configuration Discussed in ElektraInitiative#2969. backend: modifications to clear compiler errors, moved plugin position definitions to kdbprivate Discussed in ElektraInitiative#2969. backend: modified plugin functions to be called once per plugin role Discussed in ElektraInitiative#2969. backend: changed function calls to match new api Revert "cpp tools: made basic modifications to conform with new backend plugin" This reverts commit 63a10fe. tools: modified libs/tools to be compatible with the new backend plugin Discussed in ElektraInitiative#2969. backend: changed back the names of the roles of a backend Discussed in ElektraInitiative#2969. backend: changed back the names of the roles in a backend Discussed in ElektraInitiative#2969. kdbprivate: modified functions and structs to support the backend plugin Discussed in ElektraInitiative#2969. version: implemented external version plugin to work with the backend plugin Related to ElektraInitiative#2969. missing: implemented external missing plugin for compatibility with backend plugin Related to ElektraInitiative#2969. backend.c: modified backend functions to conform with new backend plugin and removed unneeded functions Discussed in ElektraInitiative#2969. missing: reformatted code style version: reformatted code style backend: restyled code Related to ElektraInitiative#2969. tools: restyled code Related to ElektraInitiative#2969. backend: restyled code Related to ElektraInitiative#2969. backend: first modifications for compatibility with the backend plugin, more to come Discussed in ElektraInitiative#2969. mount: modifications for compatibility with the backend plugin Discussed in ElektraInitiative#2969. plugin.c: restyled code Related to ElektraInitiative#2969. split: modifications for compatibility with backend plugin Related to ElektraInitiative#2969. trie: modifications for compatibility with the backend plugin Discussed in ElektraInitiative#2969. plugin.c: removed unnecessary functions Discussed in ElektraInitiative#2969. split: moved keyset sizes from backend to split and modified backendUpdateSize Discussed in ElektraInitiative#2969. kdbEnsure: commented out the ensurePluginUnmounted function until it is made compatible with the backend plugin Discussed in ElektraInitiative#2969. kdb: modified kdb functions to use the backend plugin Discussed in ElektraInitiative#2969. tests.c: modified tests to support backend plugin and new split structure Discussed in ElektraInitiative#2969. backend: modified test_backend and moved it to the backend plugin Related to ElektraInitiative#2969. backend: partially implemented tests, commented out places in tests that did not work Discussed in ElektraInitiative#2969. backend: minor debugging changes Discussed in ElektraInitiative#2969. testmod_backend: finished tests Discussed in ElektraInitiative#2969. umount: modified tests to use new configuration Discussed in ElektraInitiative#2969 backend: changed mount point of default backend Part of ElektraInitiative#2969 backend: fixed bug in elektraBackendClose which called elektraPluginClose on the wrong plugin array testmod_backend: partially fixed memory leaks backend: finished fixing memory leaks Based on ElektraInitiative#2969 backend: fix some memory problems backend: fixed wrong arguments when calling kdbGet Based on ElektraInitiative#2963 backend: fixed bug where the wrong plugin was passed to plugin function calls reformatted code mount: added check not to call backendOpenModules for the backend plugin itself Based on ElektraInitiative#2969 backend: Made kdbGet return ELEKTRA_PLUGIN_STATUS_SUCCESS in the resolver phase if there is no resolver Based on ElektraInitiative#2969 backend, kdb: reformatted code Based on ElektraInitiative#2969 cache: disable cache mount
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. |
Building upon the implementation of
elektraPluginCommit
in #2798, I would like to reimplement theBackend
structure as a plugin. That would bring the following benefits:libelektra
, asKDB
would only need to call the respective plugin functions,Another problem I would like to solve with this implementation is that backends have a limited fixed amount of plugins that they can contain.
To solve this, I propose restructuring the plugin arrays (
getplugins
,setplugins
anderrorplugins
) to arrays of linked lists. That way, plugins assigned to a specific role are added to the end of the list at the position corresponding to the role, with the possibility of a flexible number of further plugins being added to that role.Due to complexity issues with operations such as file resolving and change recognition, the following roles will still only contain a single slot in their respective arrays:
getresolver
getstorage
rollback
setresolver
setstorage
commit
Implementing backends as plugins has already been discussed in #973 and #1274.
The text was updated successfully, but these errors were encountered: