New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r.whoami() #3934
Comments
+1 this is the last special /ajax functionality the webui is using (beyond the http reql connections) |
@danielmewes -- putting this in 2.1 so it's in a milestone and we don't forget about it, but feel free to move it out if there isn't room. |
There was some relevant discussion about this in #2979 We should consider exposing this functionality as a function on the connection object instead of a ReQL term I think, like discussed over there. |
Yeah, I definitely think this should be a method or variable on the connection rather than a ReQL term. |
To bring something else over from the other thread: I really prefer the name |
I think |
Sure, |
👍 for |
to clarify, will this return the uuid of the server, the server name, or the hostname of the server? |
This will return the UUID of the server as a string. |
Also, it's not a query. So if you run |
It'd be super super nice if I could get the server name as well without having to query server_config |
What if we had |
If |
It doesn't have to be a term, we have NOREPLY_WAIT as a query-type rather than a term-type, we could add another query-type SERVER_INFO or something. |
👍 (assuming implementing this isn't too painful). |
I think either |
A |
Marking settled with |
This would be really useful for the web UI, and for |
Would also be really useful for gorethink, currently the way I am checking host status is a bit hacky. |
in review with @VeXocide, CR 3317 |
This is great, Thanks for the work guys! |
Done in |
It's similar to what was mentioned in #2979 but my use case is a bit different. I'm trying to have the connection pool in rethinkdbdash automatically populates connections to all the servers listed in the table
server_status
.And one problem that surfaces is that people may try to populate the pool from
localhost
. I have one pool per server (and a "master" that manage all these pools). Sincelocalhost
will match all the servers, I can't know exactly in which pool I should put these connections.I'm working around this by opening new connection to not localhost (by picking up the "wider" address and closing the one to localhost, but being able to run
r.whoami()
and get a server id would make the code way more simple.If the server id can be returned at the end of the handshake, that would also work for me.
The text was updated successfully, but these errors were encountered: