Component

Bootstrap and service wiring

The plugin constructs the runtime graph, starts object-store infrastructure before translog replication, and selects index or search engines from shard promotability.

Service graph

createComponents builds the shared services used by all later flows: object store, shared blob cache, cache readers, election, consistency, commit cleaner, commit service, snapshots, translog replication, hollow shard handling, memory metrics, recovery metrics, resharding, PIT relocation, and search prefetch support.

var objectStoreService = createObjectStoreService(...);
var cacheService = createSharedBlobCacheService(...);
var commitService = createStatelessCommitService(...);
var translogReplicator = new TranslogReplicator(...);
components.add(new StatelessComponents(translogReplicator, objectStoreService));
Lifecycle order matters

TranslogReplicator enqueues upload work into ObjectStoreService, so startup and shutdown are deliberately ordered. Object store starts first; translog replication stops first.

protected void doStart() {
    startComponents(List.of(objectStoreService, translogReplicator));
}

protected void doStop() {
    stopComponents(List.of(translogReplicator, objectStoreService));
}

This prevents a stopped object-store service from receiving new translog upload tasks during node shutdown.

Engine selection

The engine factory is the main runtime fork. Promotable shards run the mutable indexing path. Search-only shards run a read-only engine that applies commit notifications.

Promotableconfig.isPromotableToPrimary()
Translog callbackOperations call replicator.add(...).
Deletion policyTracks local commit refs for upload and hollowing.
IndexEngineFlush creates commits and upload pressure.
SearchableNon-promotable shards create SearchEngine.
SearchEngineConsumes notifications and opens cache-backed readers.