OLD | NEW |
(Empty) | |
| 1 -- Copyright 2016 The Chromium Authors. All Rights Reserved. |
| 2 -- |
| 3 -- Use of this source code is governed by a BSD-style |
| 4 -- license that can be found in the LICENSE file or at |
| 5 -- https://developers.google.com/open-source/licenses/bsd |
| 6 |
| 7 |
| 8 -- Create app framework tables in the monorail DB. |
| 9 |
| 10 ALTER DATABASE monorail CHARACTER SET = utf8 COLLATE = utf8_unicode_ci; |
| 11 |
| 12 -- This table allows frontends to selectively invalidate their RAM caches. |
| 13 -- On each incoming request, the frontend queries this table to get all rows |
| 14 -- that are newer than the last row that it saw. Then it processes each such |
| 15 -- row by dropping entries from its RAM caches, and remembers the new highest |
| 16 -- timestep that it has seen. |
| 17 CREATE TABLE Invalidate ( |
| 18 -- The time at which the invalidation took effect, by that time new data |
| 19 -- should be available to retrieve to fill local caches as needed. |
| 20 -- This is not a clock value, it is just an integer that counts up by one |
| 21 -- on each change. |
| 22 timestep BIGINT NOT NULL AUTO_INCREMENT, |
| 23 |
| 24 -- Which kind of entity was invalidated? Each kind is broad, e.g., |
| 25 -- invalidating a project also invalidates all issue tracker config within |
| 26 -- that project. But, they do not nest. E.g., invalidating a project does |
| 27 -- not invalidate all issues in the project. |
| 28 kind enum('user', 'project', 'issue', 'issue_id') NOT NULL, |
| 29 |
| 30 -- Which cache entry should be invalidated? Special value 0 indicates |
| 31 -- that all entries should be invalidated. |
| 32 cache_key INT UNSIGNED, |
| 33 |
| 34 INDEX (timestep) |
| 35 ) ENGINE=INNODB; |
| 36 |
OLD | NEW |