docs/agent_guides/streaming-system/message/message-semantic-collection.md
Messages operating on collections, partitions, segments, indexes, snapshots, imports, and DML.
All broadcast messages implicitly carry SharedCluster via the Broadcaster.
| Message | Dispatch | ExclusiveRequired | ResourceKey |
|---|---|---|---|
| CreateCollection | Broadcast: VChannels + CChannel | Yes (VChannel) | SharedDBName + ExclusiveCollectionName |
| DropCollection | Broadcast: VChannels + CChannel | Yes (VChannel) | SharedDBName + ExclusiveCollectionName |
| AlterCollection | Broadcast: VChannels + CChannel | Yes (VChannel) | SharedDBName + ExclusiveCollectionName |
| TruncateCollection | Broadcast: VChannels + CChannel (AckSyncUp) | Yes (VChannel) | SharedDBName + ExclusiveCollectionName |
| CreatePartition | Broadcast: VChannels + CChannel | Yes (VChannel) | SharedDBName + ExclusiveCollectionName |
| DropPartition | Broadcast: VChannels + CChannel | Yes (VChannel) | SharedDBName + ExclusiveCollectionName |
| CreateIndex | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName |
| AlterIndex | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName |
| DropIndex | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName |
| CreateSnapshot | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName + ExclusiveSnapshotName |
| DropSnapshot | Broadcast: CChannel | No | ExclusiveSnapshotName |
| RestoreSnapshot | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName + ExclusiveSnapshotName |
| DropSnapshotsByCollection | Broadcast: CChannel | No | SharedDBName + SharedCollectionName |
| Import | Broadcast: VChannels (no CChannel) | No | — |
| Insert | Single VChannel | No | — |
| Delete | Single VChannel | No | — |
| CreateSegment (SelfControlled) | Single VChannel | No | — |
| Flush (SelfControlled) | Single VChannel | No | — |
| ManualFlush | Single VChannel | Yes (VChannel) | — |
| AlterLoadConfig | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName |
| DropLoadConfig | Broadcast: CChannel | No | SharedDBName + ExclusiveCollectionName (or ExclusiveCluster) |
| BatchUpdateManifest | Broadcast: CChannel | No | SharedDBName + SharedCollectionName |
| RefreshExternalCollection | Broadcast: CChannel | No | — |
ExclusiveDBName(srcDB) + ExclusiveDBName(dstDB) (deduplicated if same DB), blocking all collection DDL in both databases.Current producers explicitly mark these collection-scoped broadcast messages with Unreplicable (_ur): CreateSnapshot, DropSnapshot, RestoreSnapshot, BatchUpdateManifest, and RefreshExternalCollection. Replication skips the concrete marked messages instead of classifying the whole message type as permanently unsupported, so newly generated messages can become replicable later by no longer setting _ur.
All TimeTick comparisons are within the same PChannel.
CreateCollection → [CreatePartition | DropPartition]* → DropCollection
CreateSegment → Insert* → (Flush | ManualFlush | DropPartition | DropCollection | TruncateCollection | FlushAll)
DDL messages (CreateCollection, DropCollection, CreatePartition, DropPartition, TruncateCollection, ManualFlush, FlushAll) acquire exclusive locks. While held:
DML (Insert/Delete) acquires shared locks — concurrent with each other, blocked by any exclusive lock.
CreateCollection(p0)@tt=1 (creates collection with default partition p0)
→ CreateSegment(seg=100)@tt=3 (WAL-generated)
→ Insert(p0, seg=100)@tt=5
→ Insert(p0, seg=100)@tt=6 (concurrent with tt=5)
→ Delete(p0)@tt=7 (concurrent with Insert)
→ Flush(seg=100)@tt=8 (WAL-generated, seg=100 sealed)
→ CreatePartition(p1)@tt=10 (add new partition)
→ CreateSegment(seg=101)@tt=11 (WAL-generated)
→ Insert(p1, seg=101)@tt=13
→ DropPartition(p1)@tt=15 (exclusive, flushes p1 segments, no more p1 DML)
→ ManualFlush@tt=18 (exclusive, seals remaining segments)
→ DropCollection@tt=20 (exclusive, flushes all segments, collection terminated)