Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Dec 7, 2023
1 parent 332e9d9 commit d74c7a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/replica/mutation_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ class mutation_log : public ref_counter

protected:
std::string _dir;
bool _is_private; // TODO(yingchun): Check it must be true!
// TODO(yingchun): Check whether they are useful anymore.
bool _is_private;
gpid _private_gpid; // only used for private log
replica *_owner_replica; // only used for private log
io_failure_callback _io_error_callback;
Expand Down
6 changes: 5 additions & 1 deletion src/tools/mutation_log_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,22 @@
#include "utils/autoref_ptr.h"
#include "utils/blob.h"
#include "utils/error_code.h"
#include "utils/flags.h"
#include "utils/time_utils.h"

namespace dsn {
namespace replication {

DSN_DECLARE_int32(log_private_file_size_mb);

bool mutation_log_tool::dump(
const std::string &log_dir,
std::ostream &output,
std::function<void(int64_t decree, int64_t timestamp, dsn::message_ex **requests, int count)>
callback)
{
auto mlog = std::make_shared<mutation_log_private>(log_dir, 32, gpid(0, 0), nullptr);
auto mlog = std::make_shared<mutation_log_private>(
log_dir, FLAGS_log_private_file_size_mb, gpid(0, 0), nullptr);
error_code err = mlog->open(
[mlog, &output, callback](int log_length, mutation_ptr &mu) -> bool {
if (mlog->max_decree(mu->data.header.pid) == 0) {
Expand Down

0 comments on commit d74c7a7

Please sign in to comment.