[protocol] Add new store schema for store lifecycle configs #1912
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement
After a version is swapped in the target region for a colo by colo push w/ deferred swap, we will perform validation. The validations will produce either a
PROCEED
(continue with the roll forward) or aROLL_BACK
(do not roll forward and roll back the target region) and the validations will be configurable via implementing theStoreLifecycleHooks
class. To support different implementations of theStoreLifecycleHooks
class, we will need to introduce a new field in the store schema to store the implementation to useSolution
Introduce a new field,
storeLifecycleHooksConfig
, in the store metavalue and admin operation schema. ThestoreLifecycleHooksConfig
will be a record and it will contain two fields in the record:storeLifecycleHooksClassName
andstoreLifecycleHooksParams
.storeLifecycleHooksClassName
will be the FQCN of theStoreLifecycleHooks
implementation andstoreLifecycleHooksParams
will optionally provide additional args to theStoreLifecycleHooks
implementationThe new schema looks like so:
Code changes
Concurrency-Specific Checks
Both reviewer and PR author to verify
synchronized
,RWLock
) are used where needed.ConcurrentHashMap
,CopyOnWriteArrayList
).How was this PR tested?
n/a. This pr only adds in the new avro schemas.
Does this PR introduce any user-facing or breaking changes?