If a insertTask is enqueued, *EnqueueDDTask(task \*task)* will set *Ts*, *ReqId*, *ProxyId*, *SegIdAssigner*, *RowIdAllocator*, then push it into queue *dmTasks*. The *SegIdAssigner* and *RowIdAllocator* will later be used in the task's execution phase.
#### 6.3 Time Tick
...
...
@@ -459,9 +504,11 @@ type MsgStream interface {
Consume()*MsgPack// message can be consumed exactly once
}
typeHashFuncfunc(*MsgPack)map[int32]*MsgPack
typePulsarMsgStreamstruct{
client*pulsar.Client
msgHashFunc(*MsgPack)map[int32]*MsgPack// return a map from produceChannel idx to *MsgPack
msgHashFuncHashFunc// return a map from produceChannel idx to *MsgPack
producers[]*pulsar.Producer
consumers[]*pulsar.Consumer
msgMarshaler*TsMsgMarshaler
...
...
@@ -471,15 +518,15 @@ type PulsarMsgStream struct {
Master serves as a centrol clock of the whole system. Other components (i.e. Proxy) allocates timestamps from master via RPC *AllocTimestamp*. All the timestamp allocation requests will be handled by the timestampOracle singleton. See section 4.2 for the details about timestampOracle.
* Request Scheduling
* System Meta
* Collection Management
* Segment Management
#### 5.3 Data definition Request Scheduler
###### 5.2.1 Task
Master receives data definition requests via grpc. Each request (described by a proto) will be wrapped as a task for further scheduling. The task interface is
```go
typetaskinterface{
Type()ReqType
Ts()Timestamp
Execute()Status
WaitToFinish()Status
Notify()Status
}
```
A task example is as follows. In this example, we wrap a CreateCollectionRequest (a proto) as a createCollectionTask. The wrapper need to contain task interfaces.