boulder/sa
Jacob Hoffman-Andrews 2b5b6239a4
sa: truncate all timestamps to seconds (#7519)
As described in #7075, go-sql-driver/mysql v1.5.0 truncates timestamps
to microseconds, while v1.6.0 and above does not. That means upon
upgrading to v1.6.0, timestamps are written to the database with a
resolution of nanoseconds, and SELECT statements also use a resolution
of nanoseconds. We believe this is the cause of performance problems
we observed when upgrading to v1.6.0 and above.

To fix that, apply rounding in the application code. Rather than
just rounding to microseconds, round to seconds since that is the
resolution we care about.  Using seconds rather than microseconds
may also allow some of our indexes to grow more slowly over time.

Note: this omits truncating some timestamps in CRL shard calculations,
since truncating those resulted in test failures that I'll follow up
on separately.
2024-06-12 15:00:24 -07:00
..
db Deprecate LeaseCRLShards feature (#7009) 2023-08-07 15:17:00 -07:00
db-next sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
db-users sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
proto Use generic types for gRPC stream implementations (#7501) 2024-05-24 13:54:25 -07:00
satest Finish migration from int64 timestamps to timestamppb (#7142) 2023-11-27 13:37:31 -08:00
testdata Support writing OCSP to Redis on revocation (#6012) 2022-04-01 13:59:56 -06:00
database.go sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
database_test.go SA: Enforce microsecond granularity for long_query_time and max_statement_time (#7224) 2023-12-21 13:06:30 -05:00
ip_range_test.go Remove all stray copyright headers and appends the initial line to LICENSE.txt (#1853) 2016-05-31 12:32:04 -07:00
metrics.go sa: refactor db initialization (#6930) 2023-06-13 10:15:40 -07:00
migrations.sh test: Support multiple database schemas (#6344) 2022-09-07 14:59:08 -07:00
model.go sa: eliminate requestedNames table (#7471) 2024-05-06 09:15:51 -07:00
model_test.go SA: store and return certificate profile name (#7352) 2024-03-20 13:08:31 -04:00
rate_limits.go Finish migration from int64 timestamps to timestamppb (#7142) 2023-11-27 13:37:31 -08:00
rate_limits_test.go Replace explicit int loops with range-over-int (#7434) 2024-04-22 10:34:51 -07:00
sa.go sa: truncate all timestamps to seconds (#7519) 2024-06-12 15:00:24 -07:00
sa_test.go sa: truncate all timestamps to seconds (#7519) 2024-06-12 15:00:24 -07:00
saro.go sa: truncate all timestamps to seconds (#7519) 2024-06-12 15:00:24 -07:00
sysvars.go SA: Check MariaDB system variables at startup (#6791) 2023-04-18 11:02:33 -04:00
sysvars_test.go SA: Check MariaDB system variables at startup (#6791) 2023-04-18 11:02:33 -04:00
type-converter.go Upgrade go-jose from v2.6.1 to v.4.0.1 (#7345) 2024-04-02 17:49:51 -04:00
type-converter_test.go Upgrade go-jose from v2.6.1 to v.4.0.1 (#7345) 2024-04-02 17:49:51 -04:00