Skip to content
  • Carlos Garnacho's avatar
    libtracker-data: Avoid refcount leaks on ontology updates · 053154dc
    Carlos Garnacho authored
    Make sure we add the new triggers after the "rename table, create
    replacement one, dump data" dance we do on ontology changes. This will
    avoid leaks as the last step there would increase refcount for all
    involved resources.
    
    There is only one situation where this does not work: Ontology changes
    that remove properties with rdfs:Resource range will result in those
    resources being leaked. This breaks differently but in similar ways for
    single-valued and multivalued properties, in the first we fail to delete
    elements from the old table, in the second we fail to delete the table
    altogether.
    
    This barely ever happens, so a FIXME has been added, we should cross this
    bridge before doing any such modification in the ontology.
    053154dc