I noticed an issue with the QueryResult -> parseRecords logic when running a query against a redis read-only replica. Specific issue around Labels retrieval that it called internally when parsing a node:
|
values[idx] = qr.parseNode(c) |
|
labels[i] = qr.graph.getLabel(labelIds[i]) |
Turned out the Labels() calls procedure internally
|
func (g *Graph) Labels() []string { |
|
qr, _ := g.CallProcedure("db.labels", nil) |
which disregards the mode for that procedure and always attempts to run RW
g.Query(q) which will obviously fail on read-only replicas.
I'm happy to submit a PR for this issue as I've already solved it in my current project.
I noticed an issue with the QueryResult -> parseRecords logic when running a query against a redis read-only replica. Specific issue around Labels retrieval that it called internally when parsing a node:
redisgraph-go/query_result.go
Line 143 in 3b0ad09
redisgraph-go/query_result.go
Line 178 in 3b0ad09
Turned out the
Labels()calls procedure internallyredisgraph-go/graph.go
Lines 283 to 284 in 3b0ad09
g.Query(q)which will obviously fail on read-only replicas.redisgraph-go/graph.go
Line 279 in 3b0ad09
I'm happy to submit a PR for this issue as I've already solved it in my current project.