Interface StoreUpdateHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StoreUpdateHandler
Handles a successful store update consumed by a parent controller.

Implementation contract — implementations must respect the following semantics:

  • Concurrency: handleStoreUpdate(java.lang.String, com.linkedin.venice.meta.Store, java.util.Set<java.lang.String>) may be invoked concurrently for different stores. Any shared state an implementation touches must be thread-safe.
  • At-least-once / idempotency: a handler may be invoked more than once for the same admin operation when checkpointing is retried, so external side effects must be idempotent or otherwise tolerate duplicate invocations.
  • No reentrant controller operations: the handler runs synchronously on the admin-consumption path while the originating updateStore caller still holds the per-store admin-message lock and waits for this checkpoint. A handler that synchronously issues another controller admin operation for the same store would block on that lock and deadlock until timeout. Handlers must not perform reentrant/blocking controller operations; offload such work asynchronously instead.
  • Field Details

  • Method Details

    • handleStoreUpdate

      void handleStoreUpdate(String clusterName, Store store, Set<String> updatedConfigs)
      Parameters:
      clusterName - the cluster containing the updated store
      store - a read-only snapshot of the final store state
      updatedConfigs - the immutable set of config keys copied from the durable UPDATE_STORE message; the set is stable across retries of the same admin operation. An empty set means the update was issued with --replicate-all-configs, in which case the durable message carries no per-config list at all and every config on the message was applied. Handlers must therefore treat an empty set as "the whole store was replicated" and fall back to store, never as "nothing changed".