redpanda
redpanda copied to clipboard
Refactor feature_table to build outside of `cluster`
(Via https://github.com/redpanda-data/redpanda/pull/5542#issuecomment-1196549345)
feature_table is constructed in application.cc and is meant to be accessible to any subsystem that wants to use it. However, it is built as part of the cluster/, so any other subsystem that doesn't link with that will have a problem using it.
We should refactor this to build feature_table somewhere anything can get at it without having to link with cluster. Maybe create a top-level features/ component that just has the table in: it's kind of a big hammer, but it's equivalent to what we already do for config/ which is a similar "table used everywhere" object.
CC @VladLazar
If we move feature_table up to the top level then it also becomes practical to early-populate it from a kvstore snapshot before controller construction.
I missed the original notification somehow.
I don't really see how lifting the feature table outside of cluster and initialising it from a kvstore snapshot are related. Kv-store can be accessed from within cluster. Am I missing something here?
Sorry, that was ambiguously worded -- it's the the "early" part that is enabled by moving it out of the controller, rather than the access to kvstore.