Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Dec 12, 2023
1 parent d6b993a commit f54e78d
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/replica/mutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class replica;
class mutation_queue
{
public:
explicit mutation_queue() {}
mutation_queue(gpid gpid, int max_concurrent_op = 2, bool batch_write_disabled = false);

~mutation_queue()
Expand Down
4 changes: 2 additions & 2 deletions src/replica/mutation_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,14 @@ void mutation_log_private::commit_pending_mutations(log_file_ptr &lf,
mutation_log::mutation_log(const std::string &dir, int32_t max_log_file_mb, gpid gpid, replica *r)
{
_dir = dir;
_is_private = true;
_is_private = (gpid.value() != 0);
_max_log_file_size_in_bytes = static_cast<int64_t>(max_log_file_mb) * 1024L * 1024L;
_min_log_file_size_in_bytes = _max_log_file_size_in_bytes / 10;
_owner_replica = r;
_private_gpid = gpid;

if (r) {
// CHECK_EQ(_private_gpid, r->get_gpid());
CHECK_EQ(_private_gpid, r->get_gpid());
}
mutation_log::init_states();
}
Expand Down
12 changes: 0 additions & 12 deletions src/replica/replica.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,6 @@ DSN_DECLARE_int32(checkpoint_max_interval_hours);

const std::string replica::kAppInfo = ".app-info";

replica::replica()
: serverlet<replica>("replica"),
replica_base(),
_primary_states(),
_potential_secondary_states(this)
{
}

replica::replica(replica_stub *stub,
gpid gpid,
const app_info &app,
Expand Down Expand Up @@ -602,10 +594,6 @@ bool replica::verbose_commit_log() const { return _stub->_verbose_commit_log; }

void replica::close()
{
if (status() == partition_status::PS_INVALID) {
return;
}

CHECK_PREFIX_MSG(status() == partition_status::PS_ERROR ||
status() == partition_status::PS_INACTIVE ||
_disk_migrator->status() == disk_migration_status::IDLE ||
Expand Down
1 change: 0 additions & 1 deletion src/replica/replica.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ class replica : public serverlet<replica>, public ref_counter, public replica_ba
bool need_restore,
bool is_duplication_follower = false);

explicit replica();
error_code initialize_on_new();
error_code initialize_on_load();
error_code init_app_and_prepare_list(bool create_new);
Expand Down
2 changes: 0 additions & 2 deletions src/replica/replica_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ struct replica_base
{
}

explicit replica_base() {}

gpid get_gpid() const { return _gpid; }

const char *replica_name() const { return _name.c_str(); }
Expand Down
1 change: 0 additions & 1 deletion src/replica/replica_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ typedef std::unordered_map<::dsn::rpc_address, remote_learner_state> learner_map
class primary_context
{
public:
explicit primary_context() {}
primary_context(gpid gpid, int max_concurrent_2pc_count = 1, bool batch_write_disabled = false)
: next_learning_version(0),
write_queue(gpid, max_concurrent_2pc_count, batch_write_disabled),
Expand Down
1 change: 0 additions & 1 deletion src/tools/mutation_log_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ bool mutation_log_tool::dump(
},
nullptr);
mlog->close();
delete rep;
if (err != dsn::ERR_OK) {
output << fmt::format("ERROR: dump mutation log failed, err = {}\n", err);
return false;
Expand Down

0 comments on commit f54e78d

Please sign in to comment.