mirror of https://github.com/milvus-io/milvus.git
[skip ci] Refine the code block in proxy design doc (#10899)
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>pull/10918/head
parent
8153beffb2
commit
a7cb92fe35
|
@ -45,7 +45,7 @@ lease in etcd. Otherwise, if some exceptions occurred in a node, or a node stopp
|
||||||
the related node information. By using this mechanism, nodes in Milvus know if there are any other nodes going to be
|
the related node information. By using this mechanism, nodes in Milvus know if there are any other nodes going to be
|
||||||
online or offline and synchronize the latest node information.
|
online or offline and synchronize the latest node information.
|
||||||
|
|
||||||
#### 6.0 Interaction with Root Coordinator
|
#### 6.1 Interaction with Root Coordinator
|
||||||
|
|
||||||
Proxy will forward the DdRequest to Root Coordinator. These requests include:
|
Proxy will forward the DdRequest to Root Coordinator. These requests include:
|
||||||
|
|
||||||
|
@ -233,18 +233,20 @@ taskScheduler maintains three queues: ddQueue, dmQueue and dqQueue correspond to
|
||||||
respectively. The interface of taskQueue is defined as follows:
|
respectively. The interface of taskQueue is defined as follows:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
type TaskQueue interface {
|
type taskQueue interface {
|
||||||
utChan() <-chan int
|
utChan() <-chan int
|
||||||
utEmpty() bool
|
utEmpty() bool
|
||||||
utFull() bool
|
utFull() bool
|
||||||
addUnissuedTask(t task) error
|
addUnissuedTask(t task) error
|
||||||
FrontUnissuedTask() task
|
FrontUnissuedTask() task
|
||||||
PopUnissuedTask() task
|
PopUnissuedTask() task
|
||||||
AddActiveTask(t task)
|
AddActiveTask(t task)
|
||||||
PopActiveTask(tID UniqueID) task
|
PopActiveTask(tID UniqueID) task
|
||||||
getTaskByReqID(reqID UniqueID) task
|
getTaskByReqID(reqID UniqueID) task
|
||||||
TaskDoneTest(ts Timestamp) bool
|
TaskDoneTest(ts Timestamp) bool
|
||||||
Enqueue(t task) error
|
Enqueue(t task) error
|
||||||
|
setMaxTaskNum(num int64)
|
||||||
|
getMaxTaskNum() int64
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -253,20 +255,20 @@ definition of the task interface is as follows:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
type task interface {
|
type task interface {
|
||||||
TraceCtx() context.Context
|
TraceCtx() context.Context
|
||||||
ID() UniqueID // return ReqID
|
ID() UniqueID // return ReqID
|
||||||
SetID(uid UniqueID) // set ReqID
|
SetID(uid UniqueID) // set ReqID
|
||||||
Name() string
|
Name() string
|
||||||
Type() commonpb.MsgType
|
Type() commonpb.MsgType
|
||||||
BeginTs() Timestamp
|
BeginTs() Timestamp
|
||||||
EndTs() Timestamp
|
EndTs() Timestamp
|
||||||
SetTs(ts Timestamp)
|
SetTs(ts Timestamp)
|
||||||
OnEnqueue() error
|
OnEnqueue() error
|
||||||
PreExecute(ctx context.Context) error
|
PreExecute(ctx context.Context) error
|
||||||
Execute(ctx context.Context) error
|
Execute(ctx context.Context) error
|
||||||
PostExecute(ctx context.Context) error
|
PostExecute(ctx context.Context) error
|
||||||
WaitToFinish() error
|
WaitToFinish() error
|
||||||
Notify(err error)
|
Notify(err error)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue