mirror of https://github.com/milvus-io/milvus.git
fix: [2.5] get replicate channel position (#41189)
- issue: #41187 - pr: #41188 Signed-off-by: SimFG <bang.fu@zilliz.com>pull/41221/head
parent
23c86af730
commit
4d813c48d2
|
@ -6439,18 +6439,6 @@ func (node *Proxy) ReplicateMessage(ctx context.Context, req *milvuspb.Replicate
|
|||
return &milvuspb.ReplicateMessageResponse{Status: merr.Status(err)}, nil
|
||||
}
|
||||
|
||||
collectionReplicateEnable := paramtable.Get().CommonCfg.CollectionReplicateEnable.GetAsBool()
|
||||
ttMsgEnabled := paramtable.Get().CommonCfg.TTMsgEnabled.GetAsBool()
|
||||
|
||||
// replicate message can be use in two ways, otherwise return error
|
||||
// 1. collectionReplicateEnable is false and ttMsgEnabled is false, active/standby mode
|
||||
// 2. collectionReplicateEnable is true and ttMsgEnabled is true, data migration mode
|
||||
if (!collectionReplicateEnable && ttMsgEnabled) || (collectionReplicateEnable && !ttMsgEnabled) {
|
||||
return &milvuspb.ReplicateMessageResponse{
|
||||
Status: merr.Status(merr.ErrDenyReplicateMessage),
|
||||
}, nil
|
||||
}
|
||||
|
||||
var err error
|
||||
if req.GetChannelName() == "" {
|
||||
log.Ctx(ctx).Warn("channel name is empty")
|
||||
|
@ -6482,6 +6470,18 @@ func (node *Proxy) ReplicateMessage(ctx context.Context, req *milvuspb.Replicate
|
|||
}, nil
|
||||
}
|
||||
|
||||
collectionReplicateEnable := paramtable.Get().CommonCfg.CollectionReplicateEnable.GetAsBool()
|
||||
ttMsgEnabled := paramtable.Get().CommonCfg.TTMsgEnabled.GetAsBool()
|
||||
|
||||
// replicate message can be use in two ways, otherwise return error
|
||||
// 1. collectionReplicateEnable is false and ttMsgEnabled is false, active/standby mode
|
||||
// 2. collectionReplicateEnable is true and ttMsgEnabled is true, data migration mode
|
||||
if (!collectionReplicateEnable && ttMsgEnabled) || (collectionReplicateEnable && !ttMsgEnabled) {
|
||||
return &milvuspb.ReplicateMessageResponse{
|
||||
Status: merr.Status(merr.ErrDenyReplicateMessage),
|
||||
}, nil
|
||||
}
|
||||
|
||||
msgPack := &msgstream.MsgPack{
|
||||
BeginTs: req.BeginTs,
|
||||
EndTs: req.EndTs,
|
||||
|
|
Loading…
Reference in New Issue