comparison 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
comparison
equal deleted inserted replaced
6805:09d9c646ca89 6806:bdd28b244839
32 32
33 .. index:: Upgrading; 2.2.0 to 2.3.0 33 .. index:: Upgrading; 2.2.0 to 2.3.0
34 34
35 Migrating from 2.2.0 to 2.3.0 35 Migrating from 2.2.0 to 2.3.0
36 ============================= 36 =============================
37
38 Rdbms version change from 7 to 8 (required)
39 -------------------------------------------
40
41 This release includes a change that requires updates to the
42 database schema.
43
44 Sessions and one time key (otks) tables in the Mysql and
45 PostgreSQL database use a numeric type that
46 truncates/rounds expiration timestamps. This results in
47 entries being purged early or late (depending on whether
48 it rounds up or down). The discrepancy is a couple of
49 days for Mysql or a couple of minutes for PostgreSQL.
50
51 Session keys stay for a week or more and CSRF keys are
52 two weeks by default. As a result, this isn't usually a
53 visible issue. This migration updates the numeric types
54 to ones that supports more significant figures.
55
56 You should backup your instance and run the
57 ``roundup-admin -i <tracker_home> migrate``
58 command for all your trackers once you've
59 installed the latest code base.
60
61 Do this before you use the web, command-line or mail
62 interface and before any users access the tracker.
63
64 If successful, this command will respond with either
65 "Tracker updated" (if you've not previously run it on an
66 RDBMS backend) or "No migration action required" (if you
67 have run it, or have used another interface to the tracker,
68 or are using anydbm).
37 69
38 Session/OTK data storage for SQLite backend changed 70 Session/OTK data storage for SQLite backend changed
39 --------------------------------------------------- 71 ---------------------------------------------------
40 72
41 Roundup stores a lot of ephemeral data: 73 Roundup stores a lot of ephemeral data:

Roundup Issue Tracker: http://roundup-tracker.org/