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
Sometimes secondary index functions are getting evaluated with global optargs present. #2767
Comments
I have implemented a fix in sam_2767. However, I don't know what the best way to write a regression test is. Is there a way to specify the global optargs in a reql test? |
Yes. See the brand new array limits reql test for a demo. |
Awaiting review 1829. |
c.f. #2710, I think it's unlikely enough that someone is relying on the old buggy behavior for their queries that we shouldn't offer a way to turn it back on. |
What does this have to do with #2710? |
There's the same question of "how likely is it someone is depending on this behavior vs. how much work is it to maintain the old behavior concurrently with the new behavior". |
Issue #2710 does not have anything to do with that question. |
Issue #2701 is the issue you are probably talking about. That issue is different because there you want to corrupt people's database files. |
Whoops, sorry for the transposition. (Also, I approved the review.) |
@srh: is this in next? |
I'm sorry. Yes, it is. |
Secondary index function evaluation should not have any global optargs present (or if they did, we'd want the global optargs captured at the secondary index creation -- but that's not how things work right now).
Right, now, at insertion things are fine -- secondary index functions are evaluated without the global optargs present (according to the testing I've done). That's why this is a low priority, v1.14 bug.
However, we can see that queries like
table.get_all([2], index='foo').run(right_bound='closed')
(with a contrived secondary index functionlambda x: x.slice(1,2)
) are at some point rerunning the secondary index function in the environment with the global optargs present, affecting their evaluation.I'm assigning this to myself because I'm already touching some of the code in question (in rget_cb_t::handle_pair).
The text was updated successfully, but these errors were encountered: