[INSTRM-1289] archiver shutdown should not delete cache files until after commit Created: 05/Jun/21 Updated: 05/Jun/21 Resolved: 05/Jun/21 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | ics_archiver |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Normal |
| Reporter: | cloomis | Assignee: | cloomis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Story Points: | 2 |
| Description |
|
The archiver stages all db traffic to per-key data files, so if the DB goes away the data can later be flushed. When the archiver shuts down it makes a new connection to the db and flushes all the files. But it flushes all of them inside a single transaction, and deletes the cache files as it reads them: if anything goes wrong in the transaction the whole flush is rolled back, but the files are then gone and all pending data is lost. Move the file deletion to a step after the transaction has been successfully committed. |
| Comments |
| Comment by cloomis [ 05/Jun/21 ] |
|
Effectively Done in |
| Comment by cloomis [ 05/Jun/21 ] |
|
Nope... |
| Comment by cloomis [ 05/Jun/21 ] |
|
Merged at ae07d0f, tagged 1.2.3 |