Item14435: Use DB transactions

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Extension
Component: DBIStoreContrib
Branches: master
Reported By: CrawfordCurrie
Waiting For:
Last Change By: CrawfordCurrie
Topic insertion is not atomic (it doesn't use transactions). So if it fails for any reason, we have to be sure to undo any changes done up to that point.

If a topic insertion fails, then the rollback record only records the insertion into the topic table, it doesn't record the insertion into the meta tables. So if the insertion fails, it will take out the topic without taking out the meta.

If the failure occurs while inserting into one of the meta tables with a unique key constraint, the effect is cumulative.

Need to add an undo for the tables as well. Or, in a future life, use transactions. And possibly DB-specific support for unique IDs (they all do it differently smile )

-- CrawfordCurrie - 14 Jul 2017

This is working for now with the undo, but really need to re-code to use transactions so leaving open and changing title from "Failed topic insertion can kill the DB" and priority from "Urgent"

-- Main.CrawfordCurrie - 31 Aug 2017 - 10:58

 
Topic revision: r2 - 31 Aug 2017, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy