redpanda icon indicating copy to clipboard operation
redpanda copied to clipboard

Refactor feature_table to build outside of `cluster`

Open jcsp opened this issue 3 years ago • 3 comments

(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.

jcsp avatar Jul 27 '22 10:07 jcsp

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.

jcsp avatar Sep 02 '22 11:09 jcsp

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?

VladLazar avatar Sep 21 '22 08:09 VladLazar

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.

jcsp avatar Sep 21 '22 08:09 jcsp