mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
Fix rocksmq bug
Signed-off-by: groot <yihua.mo@zilliz.com>
This commit is contained in:
parent
85c1404393
commit
af3736aff6
@ -103,6 +103,9 @@ func (ms *RmqMsgStream) AsProducer(channels []string) {
|
||||
err := rocksmq.Rmq.CreateChannel(channel)
|
||||
if err == nil {
|
||||
ms.producers = append(ms.producers, channel)
|
||||
} else {
|
||||
errMsg := "Failed to create producer " + channel + ", error = " + err.Error()
|
||||
panic(errMsg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ func (rmq *RocksMQ) CreateChannel(channelName string) error {
|
||||
|
||||
// Check if channel exist
|
||||
if rmq.checkKeyExist(beginKey) || rmq.checkKeyExist(endKey) {
|
||||
return errors.New("Channel " + channelName + " already exists.")
|
||||
return nil
|
||||
}
|
||||
|
||||
err := rmq.kv.Save(beginKey, "0")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user