(dbID proto.DatabaseID)
| 80 | } |
| 81 | |
| 82 | func getDatabaseProfile(dbID proto.DatabaseID) (profile *types.SQLChainProfile, err error) { |
| 83 | req := &types.QuerySQLChainProfileReq{ |
| 84 | DBID: dbID, |
| 85 | } |
| 86 | resp := &types.QuerySQLChainProfileResp{} |
| 87 | |
| 88 | err = mux.RequestBP(route.MCCQuerySQLChainProfile.String(), req, resp) |
| 89 | if err != nil { |
| 90 | err = errors.Wrapf(err, "query chain profile failed") |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | profile = &resp.Profile |
| 95 | |
| 96 | return |
| 97 | } |
| 98 | |
| 99 | func getDatabaseLeaderNodeID(dbID proto.DatabaseID) (nodeID proto.NodeID, err error) { |
| 100 | profile, err := getDatabaseProfile(dbID) |
no test coverage detected