Mercurial > p > roundup > code
diff doc/upgrading.txt @ 6806:bdd28b244839
- issue2551223 - fix timestamp truncation in mysql and postgresql
The data types used to represent timestamps in pg and mysql for
ephemeral tables: sessions and otks don't have enough signifcant
digits to work. As a result the timestamps are rounduped (up/down)
rsuling in the stored timestamp being 2 minutes (pg) or 2-3
hours(mysql) off from what it should be.
Modify db schema to use a numeric type that preserves more significant
figures. Implement schema upgrade. Document need for upgrade in
upgrading.txt.
Write tests for schema upgrade.
Implement test for updateTimestamp method on BasicDatabase that showed
this issue in the first place. Write overrides for test for
anydbm/memorydb which store timestamp properly or not at all.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 25 Jul 2022 17:20:20 -0400 |
| parents | 25d08e15e3b4 |
| children | 3f60a71b0812 |
line wrap: on
line diff
--- a/doc/upgrading.txt Mon Jul 25 16:39:31 2022 -0400 +++ b/doc/upgrading.txt Mon Jul 25 17:20:20 2022 -0400 @@ -35,6 +35,38 @@ Migrating from 2.2.0 to 2.3.0 ============================= +Rdbms version change from 7 to 8 (required) +------------------------------------------- + +This release includes a change that requires updates to the +database schema. + +Sessions and one time key (otks) tables in the Mysql and +PostgreSQL database use a numeric type that +truncates/rounds expiration timestamps. This results in +entries being purged early or late (depending on whether +it rounds up or down). The discrepancy is a couple of +days for Mysql or a couple of minutes for PostgreSQL. + +Session keys stay for a week or more and CSRF keys are +two weeks by default. As a result, this isn't usually a +visible issue. This migration updates the numeric types +to ones that supports more significant figures. + +You should backup your instance and run the +``roundup-admin -i <tracker_home> migrate`` +command for all your trackers once you've +installed the latest code base. + +Do this before you use the web, command-line or mail +interface and before any users access the tracker. + +If successful, this command will respond with either +"Tracker updated" (if you've not previously run it on an +RDBMS backend) or "No migration action required" (if you +have run it, or have used another interface to the tracker, +or are using anydbm). + Session/OTK data storage for SQLite backend changed ---------------------------------------------------
