[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 INSTRM-187, which was not running at JHU.

Comment by cloomis [ 05/Jun/21 ]

Nope... INSTRM-187 does not cover this particular case. In fact it made it more complicated..

Comment by cloomis [ 05/Jun/21 ]

Merged at ae07d0f, tagged 1.2.3

Generated at Sat Feb 10 16:33:50 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.