Skip to content

Conversation

@beautifulentropy
Copy link
Member

Extend the TypeConverter functionality added to *DbMap methods in #11 to *Transaction methods as well.

@beautifulentropy beautifulentropy requested a review from a team as a code owner November 17, 2025 22:36
@beautifulentropy beautifulentropy marked this pull request as draft November 17, 2025 22:48
@beautifulentropy beautifulentropy force-pushed the convertargs-in-transactions branch from dd6cb8c to 1a5eceb Compare November 17, 2025 22:55
@beautifulentropy beautifulentropy force-pushed the convertargs-in-transactions branch from 1a5eceb to 4ef2759 Compare November 17, 2025 23:03
@beautifulentropy beautifulentropy marked this pull request as ready for review November 17, 2025 23:09
@aarongable aarongable requested a review from jsha November 18, 2025 00:10
@beautifulentropy beautifulentropy merged commit 89c6927 into main Nov 18, 2025
5 checks passed
@beautifulentropy beautifulentropy deleted the convertargs-in-transactions branch November 18, 2025 15:09
beautifulentropy added a commit to letsencrypt/boulder that referenced this pull request Nov 19, 2025
…erter (#8494)

Today, timestamp truncation happens for queries using `*borp.DbMap` but
not `*borp.Transaction`. That means comparisons still see sub-seconds,
but inserts into MariaDB `DATETIME` columns silently truncate them to
whole seconds.

On MySQL 8, the same queries will still include sub-seconds, but inserts
into `DATETIME` columns will round to the nearest second instead of
truncate. This leads to issues for queries like the one in
`*StorageAuthority.UpdateCRLShard()`. When two CRL updaters write within
the same second one may be rounded up to the next second. When the other
updater attempts its own `UPDATE .. WHERE thisUpdate <= ?`, the
condition fails because the stored timestamp now appears to be in the
future.

Ahead of the transition from ProxySQL + MariaDB to Vitess + MySQL 8 in
#8468, update borp (letsencrypt/borp#12) to
expose Transaction arguments to the BoulderTypeConverter, allowing it to
truncate all timestamps passed through Transactions and keep behavior
consistent across `*borp.DbMap` and `*borp.Transaction`, as well as
MariaDB and MySQL 8.

Part of #7736
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants