This is an automated email from the ASF dual-hosted git repository.
wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new 6ece2f3b1 feat(remote_command): allow empty writes to be
queried/enabled/disabled by remote command (#2153)
6ece2f3b1 is described below
commit 6ece2f3b1842c9fd10d97142a194255a97a7f90b
Author: Dan Wang <[email protected]>
AuthorDate: Thu Nov 28 17:04:28 2024 +0800
feat(remote_command): allow empty writes to be queried/enabled/disabled by
remote command (#2153)
Support querying/enabling/disabling empty writes on one, multiple or all
replica servers
by just one remote command conveniently.
For example, after a table is migrated from a cluster A to another cluster
B by duplication,
we want to check whether that migration has been finished by decree.
However, since
empty writes would increase the decree, it is necessary to use only one
command to
disable empty writes on all replica servers of cluster A without need to
restart all of them.
---
src/replica/replica_stub.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/replica/replica_stub.cpp b/src/replica/replica_stub.cpp
index 6389ed50c..18b5566e6 100644
--- a/src/replica/replica_stub.cpp
+++ b/src/replica/replica_stub.cpp
@@ -229,6 +229,7 @@ METRIC_DEFINE_gauge_int64(server,
"The max size of copied files among all splitting
replicas");
DSN_DECLARE_bool(duplication_enabled);
+DSN_DECLARE_bool(empty_write_disabled);
DSN_DECLARE_bool(enable_acl);
DSN_DECLARE_bool(encrypt_data_at_rest);
DSN_DECLARE_int32(fd_beacon_interval_seconds);
@@ -2354,6 +2355,11 @@ void replica_stub::register_ctrl_command()
});
}));
+
_cmds.emplace_back(::dsn::command_manager::instance().register_bool_command(
+ FLAGS_empty_write_disabled,
+ "replica.disable-empty-write",
+ "whether to disable empty writes"));
+
#ifdef DSN_ENABLE_GPERF
_cmds.emplace_back(::dsn::command_manager::instance().register_bool_command(
_release_tcmalloc_memory,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]