You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow Outdated not documented and doesn't seem to work properly #51
I cannot find a reference to the "allow outdated" flag in the API documentation on rethinkdb.com/api .
The JavaScript driver has it in the r.table function, the Python driver actually has flags at different places (init, table, run).
Also, when I make a request with allow_outdated like this (in the Data Explorer):
r.table('stress', true).run()
I'd expect that the request is served even if there are only secondaries available for the table.
However, when I kill some of the primaries (there is still one replica for each shard online), I get
Runtime Error: cannot perform read: No master available
r.table('stress')
^^^^^^^^^^^^^^^^^
So either the flag is ignored in the JavaScript driver, or the server doesn't handle this case properly?
-----Original Message-----
From: Joe Doliner [email protected]
Date: Tue, 13 Nov 2012 11:33:41
To: rethinkdb/[email protected]
Reply-To: rethinkdb/rethinkdb [email protected]
Cc: Daniel [email protected]
Subject: Re: [rethinkdb] Allow Outdated not documented and doesn't seem to
work properly (#51)
Sigh I remember explicitly making this work. It seems as if the flag is just getting ignored. Will look in to this.
Reply to this email directly or view it on GitHub: #51 (comment)
FYI. The server is designed to perform out-of-date reads on a per-table basis. That is, if I have a query that contains an inner query, I can have outer reads be performed out-of-date and inner reads by performed normally, or vice versa. It was easier to do on the server, and strictly more powerful.
However, to the user this isn't really useful because typically you'll either run something out-of-date or you won't. For example, you might be doing an analytics query that you'll run out-of-date, or a realtime query that you'll run properly, but you're very unlikely to ever want to mix the two.
So in the clients, we decided to do it as a flag to run. If you call run with the out-of-date flag, the whole thing will be run out of date, otherwise it will be run up to date. You aren't supposed to pass the flag on each table (though some clients may or may not support it, that's purely an accident).
I'll update the api docs for each client, and @wmrowan will check the js implementation soon.
I think the solution we have in python is pretty nice right now. Any table can be explicitly specified as read out dated or not. And a default for all tables can be set in run. People who think of running things in outdated mode will find a flag on run where the expect and people who need something more powerful have it too.
Either way since we've also already released this accident and the drivers all support it (excepting js which doesn't support out dated at all) we should keep it around.
Activity
jdoliner commentedon Nov 13, 2012
Sigh I remember explicitly making this work. It seems as if the flag is just getting ignored. Will look in to this.
danielmewes commentedon Nov 13, 2012
Thanks Joe.
-----Original Message-----
From: Joe Doliner [email protected]
Date: Tue, 13 Nov 2012 11:33:41
To: rethinkdb/[email protected]
Reply-To: rethinkdb/rethinkdb [email protected]
Cc: Daniel [email protected]
Subject: Re: [rethinkdb] Allow Outdated not documented and doesn't seem to
work properly (#51)
Sigh I remember explicitly making this work. It seems as if the flag is just getting ignored. Will look in to this.
Reply to this email directly or view it on GitHub:
#51 (comment)
jdoliner commentedon Nov 13, 2012
K, so I just confirmed that this does indeed work with python. So I believe this is a javascript driver problem and nothing else.
coffeemug commentedon Nov 13, 2012
FYI. The server is designed to perform out-of-date reads on a per-table basis. That is, if I have a query that contains an inner query, I can have outer reads be performed out-of-date and inner reads by performed normally, or vice versa. It was easier to do on the server, and strictly more powerful.
However, to the user this isn't really useful because typically you'll either run something out-of-date or you won't. For example, you might be doing an analytics query that you'll run out-of-date, or a realtime query that you'll run properly, but you're very unlikely to ever want to mix the two.
So in the clients, we decided to do it as a flag to run. If you call run with the out-of-date flag, the whole thing will be run out of date, otherwise it will be run up to date. You aren't supposed to pass the flag on each table (though some clients may or may not support it, that's purely an accident).
I'll update the api docs for each client, and @wmrowan will check the js implementation soon.
jdoliner commentedon Nov 13, 2012
I think the solution we have in python is pretty nice right now. Any table can be explicitly specified as read out dated or not. And a default for all tables can be set in run. People who think of running things in outdated mode will find a flag on run where the expect and people who need something more powerful have it too.
Either way since we've also already released this accident and the drivers all support it (excepting js which doesn't support out dated at all) we should keep it around.
coffeemug commentedon Nov 13, 2012
Ah, I see, I forgot that we allow a general flag on a query + specific flags per table. This means it's definitely a js bug.
jdoliner commentedon Nov 13, 2012
Fear not the authorities have been alerted.
fixes typeo at root of #51. Closes #51
coffeemug commentedon Nov 14, 2012
Reopening, we still need to document this on the API page.
wmrowan commentedon Nov 19, 2012
Docs are in rethinkdb-www, just waiting for a push to the webserver.