CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GarbageCollectorAux< CatalogTraversalT, HashFilterT > Class Template Reference

#include <gc_aux.h>

Collaboration diagram for GarbageCollectorAux< CatalogTraversalT, HashFilterT >:

Public Member Functions

 GarbageCollectorAux (const ConfigurationTN &config)
 
bool CollectOlderThan (uint64_t timestamp, const HashFilterT &preserved_objects)
 

Private Types

typedef
CatalogTraversalT::ObjectFetcherTN 
ObjectFetcherTN
 
typedef ObjectFetcherTN::ReflogTN ReflogTN
 
typedef GarbageCollector
< CatalogTraversalT,
HashFilterT >::Configuration 
ConfigurationTN
 

Private Member Functions

std::string PrintAuxType (SqlReflog::ReferenceType type)
 
bool Sweep (const shash::Any &hash)
 

Private Attributes

const ConfigurationTN config_
 

Detailed Description

template<class CatalogTraversalT, class HashFilterT>
class GarbageCollectorAux< CatalogTraversalT, HashFilterT >

This file is part of the CernVM File System. Garbage collection for auxiliary files is much simpler than for catalogs. Auxiliary files are the tag database, meta info, and the certificate. These objects do not reference other objects. Also, they are not referenced from catalogs but from the manifest. Thus they become garbage immediately on publishing of a new revision with different objects (we still apply a grace period before deletion).

The reference log can provide a time-sorted list of object hashes. Since the hashes are unique (primary key), it is sufficient to walk through the list and remove all auxiliary objects older than X. In addition, we keep the versions of all auxiliary files provided through a hash filter. This is usually the objects referenced by the current manifest.

The timestamp X comes from the catalog garbage collection, which, as part of the catalog traversal, figures out the oldest catalog from the "previous catalog" chain that needs to be preserved (named snapshots can be older). Auxiliary files produced during publish are at least as young as their corresponding root catalog.

Definition at line 34 of file gc_aux.h.

Member Typedef Documentation

template<class CatalogTraversalT , class HashFilterT >
typedef GarbageCollector<CatalogTraversalT, HashFilterT>::Configuration GarbageCollectorAux< CatalogTraversalT, HashFilterT >::ConfigurationTN
private

Definition at line 39 of file gc_aux.h.

template<class CatalogTraversalT , class HashFilterT >
typedef CatalogTraversalT::ObjectFetcherTN GarbageCollectorAux< CatalogTraversalT, HashFilterT >::ObjectFetcherTN
private

Definition at line 35 of file gc_aux.h.

template<class CatalogTraversalT , class HashFilterT >
typedef ObjectFetcherTN::ReflogTN GarbageCollectorAux< CatalogTraversalT, HashFilterT >::ReflogTN
private

Definition at line 36 of file gc_aux.h.

Constructor & Destructor Documentation

template<class CatalogTraversalT , class HashFilterT >
GarbageCollectorAux< CatalogTraversalT, HashFilterT >::GarbageCollectorAux ( const ConfigurationTN config)
explicit

This file is part of the CernVM File System.

Definition at line 16 of file gc_aux_impl.h.

Here is the call graph for this function:

Member Function Documentation

template<class CatalogTraversalT , class HashFilterT >
bool GarbageCollectorAux< CatalogTraversalT, HashFilterT >::CollectOlderThan ( uint64_t  timestamp,
const HashFilterT &  preserved_objects 
)

Definition at line 25 of file gc_aux_impl.h.

Referenced by swissknife::CommandGc::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogTraversalT , class HashFilterT >
std::string GarbageCollectorAux< CatalogTraversalT, HashFilterT >::PrintAuxType ( SqlReflog::ReferenceType  type)
private

Definition at line 72 of file gc_aux_impl.h.

template<class CatalogTraversalT , class HashFilterT >
bool GarbageCollectorAux< CatalogTraversalT, HashFilterT >::Sweep ( const shash::Any hash)
private

Definition at line 91 of file gc_aux_impl.h.

Here is the call graph for this function:

Member Data Documentation

template<class CatalogTraversalT , class HashFilterT >
const ConfigurationTN GarbageCollectorAux< CatalogTraversalT, HashFilterT >::config_
private

The documentation for this class was generated from the following files: