Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat(dup): add is_duplicating API on replication_app_base #374

Merged
merged 1 commit into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/dsn/dist/replication/replication_app_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class replication_app_base : public replica_base

bool is_primary() const;

// Whether this replica is duplicating.
bool is_duplicating() const;

//
// Open the app.
//
Expand Down
2 changes: 2 additions & 0 deletions src/dist/replication/lib/replication_app_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ bool replication_app_base::is_primary() const
return _replica->status() == partition_status::PS_PRIMARY;
}

bool replication_app_base::is_duplicating() const { return _replica->is_duplicating(); }

error_code replication_app_base::open_internal(replica *r)
{
if (!dsn::utils::filesystem::directory_exists(_dir_data)) {
Expand Down