8000 连接中再次创建临时节点时将zk版本设置为0 by kalvinzhang · Pull Request #92 · withlin/canal-go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

连接中再次创建临时节点时将zk版本设置为0 #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion client/cluster_canal_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package client
import (
"errors"
"fmt"
"github.com/go-zookeeper/zk"
"log"
"sort"
"strings"
"time"

"github.com/go-zookeeper/zk"

pb "github.com/withlin/canal-go/protocol"
)

Expand Down Expand Up @@ -284,6 +285,8 @@ func (cc *ClusterCanalConnector) waitBecomeFirst() error {
if err != nil {
return err
}
// 再次创建临时节点成功后将版本设置为0,不然后续更新节点会出现版本冲突
cc.zkVersion = 0
return cc.waitBecomeFirst()
}
}
Expand Down
0