Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210310676
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210310676
Commits
207f6ae7
Commit
207f6ae7
authored
4 years ago
by
Kun Yu 【余昆】
Committed by
yefu.chen
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix rocksmq CreateConsumerGroup
Signed-off-by:
yukun
<
kun.yu@zilliz.com
>
parent
ab200e55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
internal/msgstream/rmqms/rmq_msgstream.go
+0
-5
0 additions, 5 deletions
internal/msgstream/rmqms/rmq_msgstream.go
internal/util/rocksmq/server/rocksmq/rocksmq.go
+7
-1
7 additions, 1 deletion
internal/util/rocksmq/server/rocksmq/rocksmq.go
with
7 additions
and
6 deletions
internal/msgstream/rmqms/rmq_msgstream.go
+
0
−
5
View file @
207f6ae7
...
...
@@ -77,11 +77,6 @@ func (rms *RmqMsgStream) Start() {
func
(
rms
*
RmqMsgStream
)
Close
()
{
rms
.
streamCancel
()
for
_
,
producer
:=
range
rms
.
producers
{
if
producer
!=
""
{
_
=
rocksmq
.
Rmq
.
DestroyChannel
(
producer
)
}
}
for
_
,
consumer
:=
range
rms
.
consumers
{
_
=
rocksmq
.
Rmq
.
DestroyConsumerGroup
(
consumer
.
GroupName
,
consumer
.
ChannelName
)
close
(
consumer
.
MsgMutex
)
...
...
This diff is collapsed.
Click to expand it.
internal/util/rocksmq/server/rocksmq/rocksmq.go
+
7
−
1
View file @
207f6ae7
...
...
@@ -174,7 +174,13 @@ func (rmq *RocksMQ) CreateConsumerGroup(groupName string, channelName string) (*
key
:=
groupName
+
"/"
+
channelName
+
"/current_id"
if
rmq
.
checkKeyExist
(
key
)
{
log
.
Debug
(
"RocksMQ: "
+
key
+
" existed."
)
return
nil
,
fmt
.
Errorf
(
"ConsumerGroup %s already exists"
,
groupName
)
for
_
,
consumer
:=
range
rmq
.
notify
[
channelName
]
{
if
consumer
.
GroupName
==
groupName
{
return
consumer
,
nil
}
}
return
nil
,
nil
}
err
:=
rmq
.
kv
.
Save
(
key
,
DefaultMessageID
)
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment