|
Zero
0.1.0
|
#include <logarchiver.h>
Public Member Functions | |
| MergerDaemon (const sm_options &, std::shared_ptr< ArchiveIndex > in, std::shared_ptr< ArchiveIndex > ou=nullptr) | |
| virtual | ~MergerDaemon () |
| virtual void | do_work () |
| rc_t | doMerge (unsigned level, unsigned fanin) |
Public Member Functions inherited from worker_thread_t | |
| worker_thread_t (int inverval_ms=-1) | |
| virtual | ~worker_thread_t () |
| void | wakeup (bool wait=false, int rounds_to_wait=-1) |
| void | stop () |
| void | wait_for_round (long round=0) |
| long | get_rounds_completed () const |
| bool | is_busy () const |
Public Member Functions inherited from thread_wrapper_t | |
| thread_wrapper_t () | |
| virtual | ~thread_wrapper_t () |
| virtual void | before_run () |
| virtual void | after_run () |
| void | spawn () |
| void | fork () |
| void | join () |
Private Attributes | |
| std::shared_ptr< ArchiveIndex > | indir |
| std::shared_ptr< ArchiveIndex > | outdir |
| unsigned | _fanin |
| bool | _compression |
Additional Inherited Members | |
Protected Member Functions inherited from worker_thread_t | |
| bool | should_exit () const |
| void | notify_one () |
| void | notify_all () |
| void | quit () |
Basic service to merge existing log archive runs into larger ones. Currently, the merge logic only supports the very limited use case of merging all N run files into a smaller n, depending on a given fan-in and size limits. Currently, it is used simply to run our restore experiments with different number of runs for the same log archive volume.
In a proper implementation, we have to support useful policies, with the restriction that only consecutive runs can be merged. The biggest limitation right now is that we reuse the logic of BlockAssembly, but its control logic – especially the coordination with the WriterThread – is quite restricted to the usual case of a consumption of log records from the standard recovery log, i.e., ascending LSNs and run numbers, startLSN coming from the existing run files, etc. We have to make that logic clever and more abstract; or simply don't reuse the BlockAssembly infrastructure.
| MergerDaemon::MergerDaemon | ( | const sm_options & | options, |
| std::shared_ptr< ArchiveIndex > | in, | ||
| std::shared_ptr< ArchiveIndex > | ou = nullptr |
||
| ) |
|
inlinevirtual |
|
virtual |
Actual working method to be implemented by derived classes.
Implements worker_thread_t.
| rc_t MergerDaemon::doMerge | ( | unsigned | level, |
| unsigned | fanin | ||
| ) |
|
private |
|
private |
|
private |
|
private |
1.8.12