jilen
jilen

Reputation: 5763

Can I use same token within different rethinkdb connections

Assume we have two clients run on different machines, and both generate token from 0.

The Server is very likely to receive same token from the two client.

What will happen if the server receive same token from two different connections ?

And what if the two connection are from same machine ?

Is it possible to STOP query with a diffrent connection from which executes the START Query

Upvotes: 1

Views: 55

Answers (1)

neumino
neumino

Reputation: 4353

TL;DR: Tokens are per connection.

You can send the same token on two different connections. If you look at for example the source of the JS driver, the token is per connection (so two connections can use the same token) See https://github.com/rethinkdb/rethinkdb/blob/next/drivers/javascript/net.coffee#L43

It you execute a query on connection A, it is not possible to stop it using connection B.

Upvotes: 2

Related Questions