Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions pkg/ccr/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,14 @@ func (m *Meta) UpdateBackends() error {
return xerror.Wrap(err, xerror.Normal, query)
}

// Compatibility fix: Replace with remote IP address
for i := range backends {
backend := backends[i]
if backend.Host == "127.0.0.1" {
backend.Host = m.Host
}
}

for _, backend := range backends {
m.Backends[backend.Id] = backend

Expand Down
7 changes: 6 additions & 1 deletion pkg/ccr/thrift_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ func NewThriftMeta(spec *base.Spec, rpcFactory rpc.IRpcFactory, tableIds []int64
}

for _, backend := range backendMetaResp.GetBackends() {
// Compatibility fix: Replace with remote IP address
host := backend.GetHost()
if host == "127.0.0.1" {
host = spec.Host
}
backendMeta := &base.Backend{
Id: backend.GetId(),
Host: backend.GetHost(),
Host: host,
BePort: uint16(backend.GetBePort()),
HttpPort: uint16(backend.GetHttpPort()),
BrpcPort: uint16(backend.GetBrpcPort()),
Expand Down