[PDB-1226] Create GC code for disassociated fact paths/values Created: 2015/02/10  Updated: 2016/04/27  Resolved: 2015/03/30

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 2.3.1

Type: Bug Priority: Normal
Reporter: Ryan Senior Assignee: Rob Browning
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to PDB-1031 ERROR: update or delete on table "fac... Closed
relates to PDB-1224 Move fact path reference from the fac... Closed
Story Points: 1
Sprint: PuppetDB 2015-02-25, PuppetDB 2015-03-11, PuppetDB 2015-03-25, PuppetDB 2015-04-08


Although we currently remove disassociated fact paths/values "as we go", it's possible, if there are two concurrent transactions that each are pointing to the same fact path and value and they are simultaneously changing to a different value, their original value could be left behind. This process would clean those up. This seems to be pretty rare that it happens, so the number of fact values left behind is pretty low. These extra values don't actually cause problems (with the new table structure created in PDB-1224), but are just extra rows that will never be surfaced to the user.

Care needs to be taken on the complexity of this query, how often it runs, how many records it would actually delete and the impact to the running system.

Comment by Rob Browning [ 2015/03/05 ]

Initial implementation is here currently here: https://github.com/rbrw/puppetdb/tree/ticket/stable/pdb-1226-global-inc-gc

Next we'll need some initial perf analysis/review (i.e. PDB-1227).

Generated at Sun Jun 16 16:22:47 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.