[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 Sat Jul 11 11:48:45 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.