CernVM-FS
2.12.0
|
#include <commit_processor.h>
Public Types | |
enum | Result { kSuccess, kError, kMergeFailure, kMissingReflog } |
Public Member Functions | |
CommitProcessor () | |
virtual | ~CommitProcessor () |
Result | Process (const std::string &lease_path, const shash::Any &old_root_hash, const shash::Any &new_root_hash, const RepositoryTag &tag, uint64_t *final_revision) |
int | GetNumErrors () const |
void | SetStatistics (perf::Statistics *st, const std::string &start_time) |
Private Attributes | |
int | num_errors_ |
perf::Statistics * | statistics_ |
std::string | start_time_ |
This class is used in the cvmfs_receiver
tool, on repository gateway machines. The receiver::Reactor class, implementing the event loop of the cvmfs_receiver
tool, dispatches the handling of the kCommit events to this class.
Its responsibility is updating the repository (sub-)catalogs with the changes introduced during the lease. After all the catalogs have been updated, the repository manifest is also updated and resigned.
Definition at line 26 of file commit_processor.h.
Enumerator | |
---|---|
kSuccess | |
kError | |
kMergeFailure | |
kMissingReflog |
Definition at line 28 of file commit_processor.h.
receiver::CommitProcessor::CommitProcessor | ( | ) |
Definition at line 81 of file commit_processor.cc.
|
virtual |
Definition at line 83 of file commit_processor.cc.
|
inline |
Definition at line 37 of file commit_processor.h.
CommitProcessor::Result receiver::CommitProcessor::Process | ( | const std::string & | lease_path, |
const shash::Any & | old_root_hash, | ||
const shash::Any & | new_root_hash, | ||
const RepositoryTag & | tag, | ||
uint64_t * | final_revision | ||
) |
Applies the changes from the new catalog onto the repository.
Let:
This method applies all the changes from C_N, with respect to C_O, onto C_G. The resulting catalog on the gateway machine (C_GN) is then set as root catalog in the repository manifest. The method also signs the updated repository manifest.
Definition at line 101 of file commit_processor.cc.
Referenced by receiver::Reactor::HandleCommit().
void receiver::CommitProcessor::SetStatistics | ( | perf::Statistics * | st, |
const std::string & | start_time | ||
) |
Definition at line 290 of file commit_processor.cc.
Referenced by receiver::Reactor::HandleCommit().
|
private |
Definition at line 42 of file commit_processor.h.
Referenced by GetNumErrors().
|
private |
Definition at line 44 of file commit_processor.h.
Referenced by Process(), and SetStatistics().
|
private |
Definition at line 43 of file commit_processor.h.
Referenced by Process(), and SetStatistics().