diggy
(Dgraph Bot)
February 19, 2020, 10:53pm
1
Moved from GitHub pydgraph/113
Posted by sausageRoll :
If I create client with several alphas:
self.client = pydgraph.DgraphClient(self.client_stub1, self.client_stub2, self.client_stub3)
Should I have possibility to execute schema creation for all nodes instead of one?
op = pydgraph.Operation(schema=self.query.get_query_by_name('schema.txt'))
self.client1.alter(op)
....
return self.any_client().alter(operation, timeout=timeout,
metadata=new_metadata,
credentials=credentials)
Instead we’re getting one random client and only one alpha will have appropriate schema, then requests to other alphas will fail.
diggy
(Dgraph Bot)
February 19, 2020, 10:59pm
2
martinmr commented :
I don’t understand your question. If you send a schema to any alpha, it will be propagated to all of the nodes in the cluster.
diggy
(Dgraph Bot)
February 19, 2020, 11:04pm
3
sausageRoll commented :
But we don’t know when it’ll be propagated, right?
diggy
(Dgraph Bot)
February 19, 2020, 11:09pm
5
sausageRoll commented :
Maybe I miss-configured something, but I’m getting error for one instance in a cluster while the second one is able to serve query
Schema not defined for predicate: temp. while running: name:"eq" args:"111088918"
diggy
(Dgraph Bot)
February 19, 2020, 11:13pm
6
martinmr commented :
It seems more of an issue with the cluster setup. What’s the output of running curl <your zero hostname>:<your zero port>/state
? By default it would be something like curl localhost:6080/state
.
diggy
(Dgraph Bot)
February 19, 2020, 11:27pm
7
sausageRoll commented :
I see, only one server, so setup issue
Sorry for bothering and thank you for help!