CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
catalog::WritableCatalog Class Reference

#include <catalog_rw.h>

Inheritance diagram for catalog::WritableCatalog:
Collaboration diagram for catalog::WritableCatalog:

Public Member Functions

 WritableCatalog (const std::string &path, const shash::Any &catalog_hash, Catalog *parent, const bool is_not_root=false)
 
virtual ~WritableCatalog ()
 
void Transaction ()
 
void Commit ()
 
bool IsDirty () const
 
bool IsWritable () const
 
uint32_t GetMaxLinkId () const
 
void AddEntry (const DirectoryEntry &entry, const XattrList &xattr, const std::string &entry_path, const std::string &parent_path)
 
void TouchEntry (const DirectoryEntryBase &entry, const XattrList &xattrs, const shash::Md5 &path_hash)
 
void TouchEntry (const DirectoryEntryBase &entry, const XattrList &xattrs, const std::string &path)
 
void RemoveEntry (const std::string &entry_path)
 
void IncLinkcount (const std::string &path_within_group, const int delta)
 
void AddFileChunk (const std::string &entry_path, const FileChunk &chunk)
 
void RemoveFileChunks (const std::string &entry_path)
 
void Partition (WritableCatalog *new_nested_catalog)
 
void MergeIntoParent ()
 
void RemoveFromParent ()
 
void InsertNestedCatalog (const std::string &mountpoint, Catalog *attached_reference, const shash::Any content_hash, const uint64_t size)
 
void InsertBindMountpoint (const std::string &mountpoint, const shash::Any content_hash, const uint64_t size)
 
void UpdateNestedCatalog (const std::string &path, const shash::Any &hash, const uint64_t size, const DeltaCounters &child_counters)
 
void RemoveNestedCatalog (const std::string &mountpoint, Catalog **attached_reference)
 
void RemoveBindMountpoint (const std::string &mountpoint)
 
void UpdateLastModified ()
 
void IncrementRevision ()
 
void SetRevision (const uint64_t new_revision)
 
void SetBranch (const std::string &branch_name)
 
void SetPreviousRevision (const shash::Any &hash)
 
void SetTTL (const uint64_t new_ttl)
 
bool SetVOMSAuthz (const std::string &voms_authz)
 
- Public Member Functions inherited from catalog::Catalog
 Catalog (const PathString &mountpoint, const shash::Any &catalog_hash, Catalog *parent, const bool is_nested=false)
 
virtual ~Catalog ()
 
bool OpenDatabase (const std::string &db_path)
 
bool LookupPath (const PathString &path, DirectoryEntry *dirent) const
 
bool LookupRawSymlink (const PathString &path, LinkString *raw_symlink) const
 
bool LookupXattrsPath (const PathString &path, XattrList *xattrs) const
 
bool ListingPath (const PathString &path, DirectoryEntryList *listing, const bool expand_symlink=true) const
 
bool ListingPathStat (const PathString &path, StatEntryList *listing) const
 
bool AllChunksBegin ()
 
bool AllChunksNext (shash::Any *hash, zlib::Algorithms *compression_alg)
 
bool AllChunksEnd ()
 
bool ListPathChunks (const PathString &path, const shash::Algorithms interpret_hashes_as, FileChunkList *chunks) const
 
CatalogList GetChildren () const
 
CatalogFindSubtree (const PathString &path) const
 
CatalogFindChild (const PathString &mountpoint) const
 
void AddChild (Catalog *child)
 
void RemoveChild (Catalog *child)
 
const HashVectorGetReferencedObjects () const
 
void TakeDatabaseFileOwnership ()
 
void DropDatabaseFileOwnership ()
 
bool OwnsDatabaseFile () const
 
uint64_t GetTTL () const
 
bool HasExplicitTTL () const
 
uint64_t GetRevision () const
 
bool GetVOMSAuthz (std::string *authz) const
 
uint64_t GetLastModified () const
 
uint64_t GetNumEntries () const
 
uint64_t GetNumChunks () const
 
shash::Any GetPreviousRevision () const
 
const CountersGetCounters () const
 
std::string PrintMemStatistics () const
 
float schema () const
 
PathString mountpoint () const
 
Catalogparent () const
 
uint64_t max_row_id () const
 
InodeRange inode_range () const
 
void set_inode_range (const InodeRange value)
 
std::string database_path () const
 
PathString root_prefix () const
 
shash::Any hash () const
 
bool volatile_flag () const
 
uint64_t revision () const
 
bool IsInitialized () const
 
bool IsRoot () const
 
bool IsAutogenerated () const
 
bool HasParent () const
 
const NestedCatalogListListNestedCatalogs () const
 
const NestedCatalogList ListOwnNestedCatalogs () const
 
bool FindNested (const PathString &mountpoint, shash::Any *hash, uint64_t *size) const
 
void SetInodeAnnotation (InodeAnnotation *new_annotation)
 
inode_t GetMangledInode (const uint64_t row_id, const uint64_t hardlink_group) const
 
void SetOwnerMaps (const OwnerMap *uid_map, const OwnerMap *gid_map)
 
uint64_t MapUid (const uint64_t uid) const
 
uint64_t MapGid (const uint64_t gid) const
 

Static Public Member Functions

static WritableCatalogAttachFreely (const std::string &root_path, const std::string &file, const shash::Any &catalog_hash, Catalog *parent=NULL, const bool is_not_root=false)
 
- Static Public Member Functions inherited from catalog::Catalog
static CatalogAttachFreely (const std::string &imaginary_mountpoint, const std::string &file, const shash::Any &catalog_hash, Catalog *parent=NULL, const bool is_nested=false)
 

Protected Member Functions

CatalogDatabase::OpenMode DatabaseOpenMode () const
 
void UpdateEntry (const DirectoryEntry &entry, const shash::Md5 &path_hash)
 
void UpdateEntry (const DirectoryEntry &entry, const std::string &path)
 
void AddEntry (const DirectoryEntry &entry, const XattrList &xattrs, const std::string &path)
 
void InitPreparedStatements ()
 
void FinalizePreparedStatements ()
 
WritableCatalogGetWritableParent () const
 
int dirty_children () const
 
void set_dirty_children (const int count)
 
int DecrementDirtyChildren ()
 
- Protected Member Functions inherited from catalog::Catalog
bool InitStandalone (const std::string &database_file)
 
bool ReadCatalogCounters ()
 
void FinalizePreparedStatements ()
 
CountersGetWritableCounters ()
 
const CatalogDatabasedatabase () const
 
CatalogDatabasedatabase ()
 
void set_parent (Catalog *catalog)
 
void ResetNestedCatalogCacheUnprotected ()
 
bool LookupMd5Path (const shash::Md5 &md5path, DirectoryEntry *dirent) const
 

Static Protected Attributes

static const double kMaximalFreePageRatio = 0.20
 
static const double kMaximalRowIdWasteRatio = 0.25
 

Private Member Functions

void SetDirty ()
 
void MakeTransitionPoint (const std::string &mountpoint)
 
void MakeNestedRoot ()
 
void MoveToNested (const std::string dir_structure_root, WritableCatalog *new_nested_catalog, std::vector< std::string > *grand_child_mountpoints)
 
void MoveToNestedRecursively (const std::string dir_structure_root, WritableCatalog *new_nested_catalog, std::vector< std::string > *grand_child_mountpoints)
 
void MoveCatalogsToNested (const std::vector< std::string > &nested_catalogs, WritableCatalog *new_nested_catalog)
 
void MoveFileChunksToNested (const std::string &full_path, const shash::Algorithms algorithm, WritableCatalog *new_nested_catalog)
 
void CopyToParent ()
 
void CopyCatalogsToParent ()
 
void UpdateCounters ()
 
void VacuumDatabaseIfNecessary ()
 

Private Attributes

SqlDirentInsertsql_insert_
 
SqlDirentUnlinksql_unlink_
 
SqlDirentTouchsql_touch_
 
SqlDirentUpdatesql_update_
 
SqlChunkInsertsql_chunk_insert_
 
SqlChunksRemovesql_chunks_remove_
 
SqlChunksCountsql_chunks_count_
 
SqlMaxHardlinkGroupsql_max_link_id_
 
SqlIncLinkcountsql_inc_linkcount_
 
bool dirty_
 
DeltaCounters delta_counters_
 
atomic_int32 dirty_children_
 

Friends

class WritableCatalogManager
 
class swissknife::CommandMigrate
 
class VirtualCatalog
 

Additional Inherited Members

- Public Types inherited from catalog::Catalog
typedef std::vector< shash::AnyHashVector
 
typedef std::vector
< NestedCatalog
NestedCatalogList
 
- Static Public Attributes inherited from catalog::Catalog
static const uint64_t kDefaultTTL = 240
 
- Protected Types inherited from catalog::Catalog
typedef std::map< uint64_t,
inode_t
HardlinkGroupMap
 
- Protected Attributes inherited from catalog::Catalog
HardlinkGroupMap hardlink_groups_
 
pthread_mutex_t * lock_
 

Detailed Description

Definition at line 36 of file catalog_rw.h.

Constructor & Destructor Documentation

catalog::WritableCatalog::WritableCatalog ( const std::string &  path,
const shash::Any catalog_hash,
Catalog parent,
const bool  is_not_root = false 
)

Definition at line 26 of file catalog_rw.cc.

Referenced by AttachFreely().

Here is the caller graph for this function:

catalog::WritableCatalog::~WritableCatalog ( )
virtual

Definition at line 65 of file catalog_rw.cc.

Here is the call graph for this function:

Member Function Documentation

void catalog::WritableCatalog::AddEntry ( const DirectoryEntry entry,
const XattrList xattr,
const std::string &  entry_path,
const std::string &  parent_path 
)
void catalog::WritableCatalog::AddEntry ( const DirectoryEntry entry,
const XattrList xattrs,
const std::string &  path 
)
inlineprotected

Definition at line 125 of file catalog_rw.h.

Here is the call graph for this function:

void catalog::WritableCatalog::AddFileChunk ( const std::string &  entry_path,
const FileChunk chunk 
)

Definition at line 264 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::AddChunkedFile(), catalog::WritableCatalogManager::AddHardlinkGroup(), and MoveFileChunksToNested().

Here is the call graph for this function:

Here is the caller graph for this function:

WritableCatalog * catalog::WritableCatalog::AttachFreely ( const std::string &  root_path,
const std::string &  file,
const shash::Any catalog_hash,
Catalog parent = NULL,
const bool  is_not_root = false 
)
static

Definition at line 49 of file catalog_rw.cc.

Referenced by swissknife::CommandMigrate::MigrationWorker_20x::CreateNewEmptyCatalog(), swissknife::Assistant::GetCatalog(), and swissknife::CommandTag::GetCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::Commit ( )

Definition at line 80 of file catalog_rw.cc.

Referenced by swissknife::CommandMigrate::MigrationWorker_20x::CommitDatabaseTransaction(), CopyToParent(), and catalog::WritableCatalogManager::FinalizeCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::CopyCatalogsToParent ( )
private

Definition at line 679 of file catalog_rw.cc.

Referenced by MergeIntoParent().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::CopyToParent ( )
private

Definition at line 698 of file catalog_rw.cc.

Referenced by MergeIntoParent().

Here is the call graph for this function:

Here is the caller graph for this function:

CatalogDatabase::OpenMode catalog::WritableCatalog::DatabaseOpenMode ( ) const
inlineprotectedvirtual

Specifies the SQLite open flags. Overwritten by r/w catalog.

Reimplemented from catalog::Catalog.

Definition at line 113 of file catalog_rw.h.

int catalog::WritableCatalog::DecrementDirtyChildren ( )
inlineprotected

Definition at line 146 of file catalog_rw.h.

Referenced by catalog::WritableCatalogManager::CatalogUploadCallback().

Here is the caller graph for this function:

int catalog::WritableCatalog::dirty_children ( ) const
inlineprotected

Definition at line 142 of file catalog_rw.h.

void catalog::WritableCatalog::FinalizePreparedStatements ( )
protected

Definition at line 106 of file catalog_rw.cc.

Referenced by ~WritableCatalog().

Here is the caller graph for this function:

uint32_t catalog::WritableCatalog::GetMaxLinkId ( ) const

Find out the maximal hardlink group id in this catalog.

Definition at line 124 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::AddHardlinkGroup(), and CopyToParent().

Here is the call graph for this function:

Here is the caller graph for this function:

WritableCatalog* catalog::WritableCatalog::GetWritableParent ( ) const
inlineprotected

Definition at line 136 of file catalog_rw.h.

Referenced by catalog::WritableCatalogManager::CatalogUploadCallback(), CopyCatalogsToParent(), CopyToParent(), MergeIntoParent(), RemoveFromParent(), and catalog::WritableCatalogManager::SnapshotCatalogsSerialized().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::IncLinkcount ( const std::string &  path_within_group,
const int  delta 
)

Definition at line 208 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::ShrinkHardlinkGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::IncrementRevision ( )

Increments the revision of the catalog in the database.

Definition at line 324 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::FinalizeCatalog(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::UpdateCatalogMetadata().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::InitPreparedStatements ( )
protectedvirtual

InitPreparedStatement uses polymorphism in case of a r/w catalog. FinalizePreparedStatements is called in the destructor where polymorphism does not work any more and has to be called both in the WritableCatalog and the Catalog destructor

Reimplemented from catalog::Catalog.

Definition at line 89 of file catalog_rw.cc.

Here is the call graph for this function:

void catalog::WritableCatalog::InsertBindMountpoint ( const std::string &  mountpoint,
const shash::Any  content_hash,
const uint64_t  size 
)

Registeres a snapshot in /.cvmfs/snapshots. Note that bind mountpoints are not universally handled: in Partition and MergeIntoParent, bind mountpoint handling is missing!

Definition at line 535 of file catalog_rw.cc.

Referenced by catalog::VirtualCatalog::InsertSnapshot().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::InsertNestedCatalog ( const std::string &  mountpoint,
Catalog attached_reference,
const shash::Any  content_hash,
const uint64_t  size 
)

Insert a nested catalog reference into this catalog. The attached catalog object of this mountpoint can be specified (optional) This way, the in-memory representation of the catalog tree is updated, too

Parameters
mountpointthe path to the catalog to add a reference to
attached_referencecan contain a reference to the attached catalog object of mountpoint
content_hashcan be set to safe a content hash together with the reference

Definition at line 502 of file catalog_rw.cc.

Referenced by CopyCatalogsToParent(), catalog::WritableCatalogManager::CreateNestedCatalog(), MoveCatalogsToNested(), and catalog::WritableCatalogManager::SwapNestedCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

bool catalog::WritableCatalog::IsDirty ( ) const
inline
bool catalog::WritableCatalog::IsWritable ( ) const
inlinevirtual

Reimplemented from catalog::Catalog.

Definition at line 58 of file catalog_rw.h.

void catalog::WritableCatalog::MakeNestedRoot ( )
private

Definition at line 395 of file catalog_rw.cc.

Referenced by Partition().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::MakeTransitionPoint ( const std::string &  mountpoint)
private

Definition at line 380 of file catalog_rw.cc.

Referenced by Partition().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::MergeIntoParent ( )

Definition at line 646 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::RemoveNestedCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::MoveCatalogsToNested ( const std::vector< std::string > &  nested_catalogs,
WritableCatalog new_nested_catalog 
)
private

Definition at line 456 of file catalog_rw.cc.

Referenced by Partition().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::MoveFileChunksToNested ( const std::string &  full_path,
const shash::Algorithms  algorithm,
WritableCatalog new_nested_catalog 
)
private

Definition at line 477 of file catalog_rw.cc.

Referenced by MoveToNestedRecursively().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::MoveToNested ( const std::string  dir_structure_root,
WritableCatalog new_nested_catalog,
std::vector< std::string > *  grand_child_mountpoints 
)
inlineprivate

Definition at line 177 of file catalog_rw.h.

Referenced by Partition().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::MoveToNestedRecursively ( const std::string  dir_structure_root,
WritableCatalog new_nested_catalog,
std::vector< std::string > *  grand_child_mountpoints 
)
private

Definition at line 407 of file catalog_rw.cc.

Referenced by MoveToNested().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::Partition ( WritableCatalog new_nested_catalog)

Moves a subtree from this catalog into a just created nested catalog.

Definition at line 360 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::CreateNestedCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::RemoveBindMountpoint ( const std::string &  mountpoint)

Unregisteres a snapshot from /.cvmfs/snapshots. Note that bind mountpoints are not universally handled: in Partition and MergeIntoParent, bind mountpoint handling is missing!

Definition at line 597 of file catalog_rw.cc.

Referenced by catalog::VirtualCatalog::RemoveSnapshot().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::RemoveEntry ( const std::string &  entry_path)

Removes the specified entry from the catalog. Note: removing a directory which is non-empty results in dangling entries. (this should be treated in upper layers)

Parameters
entry_paththe full path of the DirectoryEntry to delete

Definition at line 184 of file catalog_rw.cc.

Referenced by CopyToParent(), catalog::WritableCatalogManager::FixWeight(), MoveToNestedRecursively(), catalog::WritableCatalogManager::RemoveDirectory(), and catalog::WritableCatalogManager::RemoveFile().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::RemoveFileChunks ( const std::string &  entry_path)

Removes the file chunks for a given file path

Parameters
entry_paththe file path to clear from it's file chunks

Definition at line 291 of file catalog_rw.cc.

Referenced by RemoveEntry().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::RemoveFromParent ( )

Definition at line 667 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::RemoveNestedCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::RemoveNestedCatalog ( const std::string &  mountpoint,
Catalog **  attached_reference 
)

Remove a nested catalog reference from the database. If the catalog 'mountpoint' is currently attached as a child, it will be removed, too (but not detached).

Parameters
[in]mountpointthe mountpoint of the nested catalog to dereference in the database
[out]attached_referenceis set to the object of the attached child or to NULL

Definition at line 561 of file catalog_rw.cc.

Referenced by MergeIntoParent(), MoveCatalogsToNested(), RemoveFromParent(), and catalog::WritableCatalogManager::SwapNestedCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::set_dirty_children ( const int  count)
inlineprotected

Definition at line 143 of file catalog_rw.h.

Referenced by catalog::WritableCatalogManager::GetModifiedCatalogLeafsRecursively().

Here is the caller graph for this function:

void catalog::WritableCatalog::SetBranch ( const std::string &  branch_name)

Definition at line 334 of file catalog_rw.cc.

Here is the call graph for this function:

void catalog::WritableCatalog::SetDirty ( )
inlineprivate

Definition at line 168 of file catalog_rw.h.

Referenced by AddFileChunk(), catalog::WritableCatalogManager::Commit(), CopyToParent(), IncLinkcount(), RemoveEntry(), TouchEntry(), UpdateEntry(), and UpdateNestedCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::SetPreviousRevision ( const shash::Any hash)

Sets the content hash of the previous catalog revision.

Definition at line 352 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::FinalizeCatalog(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::UpdateCatalogMetadata().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::SetRevision ( const uint64_t  new_revision)

Definition at line 329 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::Commit(), and IncrementRevision().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::SetTTL ( const uint64_t  new_ttl)

Definition at line 339 of file catalog_rw.cc.

Here is the call graph for this function:

bool catalog::WritableCatalog::SetVOMSAuthz ( const std::string &  voms_authz)

Definition at line 344 of file catalog_rw.cc.

Here is the call graph for this function:

void catalog::WritableCatalog::TouchEntry ( const DirectoryEntryBase entry,
const XattrList xattrs,
const shash::Md5 path_hash 
)

Definition at line 224 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::SwapNestedCatalog(), catalog::WritableCatalogManager::TouchDirectory(), and TouchEntry().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::TouchEntry ( const DirectoryEntryBase entry,
const XattrList xattrs,
const std::string &  path 
)
inline

Definition at line 68 of file catalog_rw.h.

Here is the call graph for this function:

void catalog::WritableCatalog::Transaction ( )

Definition at line 72 of file catalog_rw.cc.

Referenced by SetDirty(), and swissknife::CommandMigrate::MigrationWorker_20x::StartDatabaseTransaction().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::UpdateCounters ( )
private

Writes delta_counters_ to the database.

Definition at line 765 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::FinalizeCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::UpdateEntry ( const DirectoryEntry entry,
const shash::Md5 path_hash 
)
protected
void catalog::WritableCatalog::UpdateEntry ( const DirectoryEntry entry,
const std::string &  path 
)
inlineprotected

Definition at line 118 of file catalog_rw.h.

Here is the call graph for this function:

void catalog::WritableCatalog::UpdateLastModified ( )

Sets the last modified time stamp of this catalog to current time.

Definition at line 316 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::FinalizeCatalog(), and swissknife::CommandMigrate::AbstractMigrationWorker< DerivedT >::UpdateCatalogMetadata().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::UpdateNestedCatalog ( const std::string &  path,
const shash::Any hash,
const uint64_t  size,
const DeltaCounters child_counters 
)

Updates the link to a nested catalog in the database.

Parameters
paththe path of the nested catalog to update
hashthe hash to set the given nested catalog link to
sizethe uncompressed catalog database file size
child_countersthe statistics counters of the nested catalog

Definition at line 620 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::CatalogUploadCallback(), and catalog::WritableCatalogManager::SnapshotCatalogsSerialized().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::WritableCatalog::VacuumDatabaseIfNecessary ( )
private

Checks if the database of this catalogs needs cleanup and defragments it if necessary

Definition at line 776 of file catalog_rw.cc.

Referenced by catalog::WritableCatalogManager::FinalizeCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class swissknife::CommandMigrate
friend

Definition at line 38 of file catalog_rw.h.

friend class VirtualCatalog
friend

Definition at line 39 of file catalog_rw.h.

friend class WritableCatalogManager
friend

Definition at line 37 of file catalog_rw.h.

Member Data Documentation

bool catalog::WritableCatalog::dirty_
private

Indicates if the catalog has been changed

Definition at line 161 of file catalog_rw.h.

Referenced by Commit(), CopyToParent(), IsDirty(), and SetDirty().

atomic_int32 catalog::WritableCatalog::dirty_children_
mutableprivate
const double catalog::WritableCatalog::kMaximalFreePageRatio = 0.20
staticprotected

Definition at line 110 of file catalog_rw.h.

Referenced by VacuumDatabaseIfNecessary().

const double catalog::WritableCatalog::kMaximalRowIdWasteRatio = 0.25
staticprotected

Definition at line 111 of file catalog_rw.h.

Referenced by VacuumDatabaseIfNecessary().

SqlChunkInsert* catalog::WritableCatalog::sql_chunk_insert_
private

Definition at line 155 of file catalog_rw.h.

Referenced by AddFileChunk(), FinalizePreparedStatements(), and InitPreparedStatements().

SqlChunksCount* catalog::WritableCatalog::sql_chunks_count_
private
SqlChunksRemove* catalog::WritableCatalog::sql_chunks_remove_
private
SqlIncLinkcount* catalog::WritableCatalog::sql_inc_linkcount_
private

Definition at line 159 of file catalog_rw.h.

Referenced by FinalizePreparedStatements(), IncLinkcount(), and InitPreparedStatements().

SqlDirentInsert* catalog::WritableCatalog::sql_insert_
private

Definition at line 151 of file catalog_rw.h.

Referenced by FinalizePreparedStatements(), and InitPreparedStatements().

SqlMaxHardlinkGroup* catalog::WritableCatalog::sql_max_link_id_
private

Definition at line 158 of file catalog_rw.h.

Referenced by FinalizePreparedStatements(), GetMaxLinkId(), and InitPreparedStatements().

SqlDirentTouch* catalog::WritableCatalog::sql_touch_
private

Definition at line 153 of file catalog_rw.h.

Referenced by FinalizePreparedStatements(), InitPreparedStatements(), and TouchEntry().

SqlDirentUnlink* catalog::WritableCatalog::sql_unlink_
private

Definition at line 152 of file catalog_rw.h.

Referenced by FinalizePreparedStatements(), InitPreparedStatements(), and RemoveEntry().

SqlDirentUpdate* catalog::WritableCatalog::sql_update_
private

Definition at line 154 of file catalog_rw.h.

Referenced by FinalizePreparedStatements(), InitPreparedStatements(), and UpdateEntry().


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