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.
config.isPromotableToPrimary()replicator.add(...).SearchEngine.