Component

Commit creation, upload, notification, and retention

StatelessCommitService turns local Lucene commits into object-store-backed batched compound commits, then coordinates search-node visibility and cleanup.

Lifecycle timeline
Local commitIndexEngineDeletionPolicy creates a StatelessCommitRef.
AppendonCommitCreation appends it to a virtual BCC.
Persist operationsNon-uploaded notifications wait for max seqno durability.
UploadBatchedCompoundCommitUploadTask writes the BCC blob.
NotifySearch nodes receive the newest uploaded BCC and return commits in use.
Retain/deleteOpen readers, PITs, and pending uploads determine safe deletion.
Commit creation

onCommitCreation validates shard state, skips recovered or already-handled hollow commits, appends the commit to a virtual BCC, then decides whether to notify search shards or only complete local listeners.

virtualBcc = commitState.appendCommit(reference, timestampFieldValueRange);
...
// Non-uploaded new commit notifications should be sent after ensuring
// the operations are persisted.
BCC upload

Upload is encapsulated in BatchedCompoundCommitUploadTask. The service updates BCC size, commit count, and age metrics, then runs the task. On success, the shard state marks the BCC uploaded and sends the new uploaded commit notification.

var bccUpload = new BatchedCompoundCommitUploadTask(
    threadPool,
    cacheWarmingService,
    objectStoreService,
    new UploadRetryDecider(commitState),
    ...);
bccUpload.run();
Search-node notification and retention feedback

Uploaded commit notification is not just a broadcast. The publisher sends to current search shards and old nodes that may retain commits, then collects commits still in use. That feedback drives release of BCC references and deletion of obsolete blob ranges.

sendNewUploadedCommitNotificationAndFetchInUseCommits(
    shardRoutingTable.get(),
    currentRoutingNodesWithAssignedSearchShards,
    allSearchNodesRetainingCommits,
    uploadedBcc,
    clusterService.state().version(),
    ...);