-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
sa: truncate times in type converter #7556
Conversation
BTW thanks to @aarongable and @beautifulentropy for encouraging me to find a more systemic fix in #7519 (review). I did a version of this change where instead of truncating, it would panic if it received an untruncated time. It found a couple of call sites that I missed in #7519 which are probably pretty important to performance (SELECTs against time indexes that are called on new-order): Lines 75 to 77 in 8545ea8
Lines 131 to 133 in 8545ea8
|
Also, once this change lands I'll submit a separate revert of #7519. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I have a borp question.
Do queries wrapped in a (t *Transaction)
get unwrapped for lack of a better term into their underlying (m *DbMap)
so that both transactional and non-transactional queries run through m.convertArgs
?
We create transactions using |
We believe the MariaDB query planner generates inefficient query plans when a time index is queried using high precision (nanosecond) times. This uses the updated borp from letsencrypt/borp#11 to automatically truncate
time.Time
and*time.Time
in query parameters.Part of #5437