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
Consider turning off construction-location backtraces in Ruby driver #1843
Comments
There are two options: turn them off by default, or remove them entirely. I think we should probably do the former. |
Can you describe what this is? Is this something that isn't in the other drivers? I can't read Ruby code :( |
This is only in the Ruby driver. Basically, we give two backtraces when a query fails: the first shows where the query was run, and the second shows the line where the erroneous portion of the query was constructed. Let's say we have this: 0 def get_date_range(tbl, left, right)
1 tbl.between(r.epoch_time(left), r.epoch_time(right), index:'date')
2 end
3
4 def complete_entry_p(entry)
5 entry['field1'] & entry['field2'] & entry['field3'] & entry['field4']
6 end
7
8 get_date_range(r.table('test'), t1, t2).filter{|row| r.not(complete_entry_p(row))}.run If an error occurs during the (Basically, every time we build a portion of a query we record where it was built, and later if the backtrace we get from the server shows that that portion of the query caused the error, we tell the user where it was built.) |
Would be interesting to know how much the performance impact actually is in a benchmark like https://github.com/ajselvig/RubyDatabaseBenchmarks (also see #1798 ). PS: |
This is what I get with rethinkdb next:
Without tracking the caller:
|
@nviennot: Cool, thanks for trying that out! Looks like it might well be worth disabling it by default. |
After some thought, I think we should just get rid of these backtraces. I think they're probably more confusing than helpful for people who aren't me, even though they're cool. Does anyone object strongly? |
Alright, I think I'm gonna do this. |
Yeah it's a really amazing feature, but probably not necessary for most users. |
This is in review 1129 by @AtnNn . |
In next. |
They make it slower than it should be (see more discussion at #1842).
The text was updated successfully, but these errors were encountered: