Lifecycle timeline
IndexEngineDeletionPolicy creates a StatelessCommitRef.onCommitCreation appends it to a virtual BCC.BatchedCompoundCommitUploadTask writes the BCC blob.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(),
...);