瀏覽代碼

Set rpc_address for discovered hosts

According to documentation, the rpc_address is what should be used
for native transport. Not the peer address (listen address).
Johnny Bergström 10 年之前
父節點
當前提交
bd3f975a85
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      host_source.go

+ 1 - 1
host_source.go

@@ -98,7 +98,7 @@ func (r *ringDescriber) GetHosts() (hosts []HostInfo, partitioner string, err er
 
 	hosts = []HostInfo{localHost}
 
-	iter := r.session.control.query("SELECT peer, data_center, rack, host_id, tokens FROM system.peers")
+	iter := r.session.control.query("SELECT rpc_address, data_center, rack, host_id, tokens FROM system.peers")
 	if iter == nil {
 		return r.prevHosts, r.prevPartitioner, nil
 	}