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 1206e6a6e feat(slog): Remove slog related code (2nd) (#1871)
1206e6a6e is described below

commit 1206e6a6e7f67961f86d4c81d00863f84df04d50
Author: Yingchun Lai <[email protected]>
AuthorDate: Thu Jan 25 14:14:19 2024 +0800

    feat(slog): Remove slog related code (2nd) (#1871)
---
 src/common/replication_common.cpp |  6 ------
 src/replica/replica_2pc.cpp       | 27 ++-------------------------
 src/replica/replica_stub.cpp      |  9 ---------
 3 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/src/common/replication_common.cpp 
b/src/common/replication_common.cpp
index a54d4bbfd..1585aefe5 100644
--- a/src/common/replication_common.cpp
+++ b/src/common/replication_common.cpp
@@ -79,12 +79,6 @@ DSN_DEFINE_int32(replication,
                  10,
                  "grace (seconds) assigned to remote FD slaves (grace > 
lease)");
 
-// TODO(yingchun): useless any more, remove it from all config files later.
-// DSN_DEFINE_int32(replication,
-//                     log_shared_batch_buffer_kb,
-//                     0,
-//                     "shared log buffer size (KB) for batching incoming 
logs");
-
 DSN_DEFINE_int32(replication,
                  cold_backup_checkpoint_reserve_minutes,
                  10,
diff --git a/src/replica/replica_2pc.cpp b/src/replica/replica_2pc.cpp
index cf2f84df2..31be50c7f 100644
--- a/src/replica/replica_2pc.cpp
+++ b/src/replica/replica_2pc.cpp
@@ -49,23 +49,22 @@
 #include "metadata_types.h"
 #include "mutation.h"
 #include "mutation_log.h"
+#include "ranger/access_type.h"
 #include "replica.h"
 #include "replica/prepare_list.h"
 #include "replica/replica_context.h"
 #include "replica/replication_app_base.h"
 #include "replica_stub.h"
 #include "runtime/api_layer1.h"
-#include "ranger/access_type.h"
-#include "runtime/rpc/network.h"
 #include "runtime/rpc/rpc_address.h"
 #include "runtime/rpc/rpc_message.h"
 #include "runtime/rpc/rpc_stream.h"
 #include "runtime/rpc/serialization.h"
-#include "security/access_controller.h"
 #include "runtime/task/async_calls.h"
 #include "runtime/task/task.h"
 #include "runtime/task/task_code.h"
 #include "runtime/task/task_spec.h"
+#include "security/access_controller.h"
 #include "split/replica_split_manager.h"
 #include "utils/api_utilities.h"
 #include "utils/autoref_ptr.h"
@@ -99,14 +98,6 @@ DSN_DEFINE_int32(replication,
                  prepare_decree_gap_for_debug_logging,
                  10000,
                  "if greater than 0, then print debug log every decree gap of 
preparing");
-DSN_DEFINE_int32(replication,
-                 log_shared_pending_size_throttling_threshold_kb,
-                 0,
-                 "log_shared_pending_size_throttling_threshold_kb");
-DSN_DEFINE_int32(replication,
-                 log_shared_pending_size_throttling_delay_ms,
-                 0,
-                 "log_shared_pending_size_throttling_delay_ms");
 DSN_DEFINE_uint64(
     replication,
     max_allowed_write_size,
@@ -353,20 +344,6 @@ void replica::init_prepare(mutation_ptr &mu, bool 
reconciliation, bool pop_all_c
                                               get_gpid().thread_hash(),
                                               &pending_size);
         CHECK_NOTNULL(mu->log_task(), "");
-        if (FLAGS_log_shared_pending_size_throttling_threshold_kb > 0 &&
-            FLAGS_log_shared_pending_size_throttling_delay_ms > 0 &&
-            pending_size >= 
FLAGS_log_shared_pending_size_throttling_threshold_kb * 1024) {
-            int delay_ms = FLAGS_log_shared_pending_size_throttling_delay_ms;
-            for (dsn::message_ex *r : mu->client_requests) {
-                if (r && r->io_session->delay_recv(delay_ms)) {
-                    LOG_WARNING("too large pending shared log ({}), delay 
traffic from {} for {} "
-                                "milliseconds",
-                                pending_size,
-                                r->header->from_address,
-                                delay_ms);
-                }
-            }
-        }
     }
 
     _primary_states.last_prepare_ts_ms = mu->prepare_ts_ms();
diff --git a/src/replica/replica_stub.cpp b/src/replica/replica_stub.cpp
index f3167d32a..5e3f90971 100644
--- a/src/replica/replica_stub.cpp
+++ b/src/replica/replica_stub.cpp
@@ -229,10 +229,6 @@ DSN_DEFINE_bool(replication,
                 mem_release_enabled,
                 true,
                 "whether to enable periodic memory release");
-DSN_DEFINE_bool(replication,
-                log_shared_force_flush,
-                false,
-                "when write shared log, whether to flush file after write 
done");
 DSN_DEFINE_bool(replication,
                 gc_disabled,
                 false,
@@ -275,11 +271,6 @@ DSN_DEFINE_int32(replication,
                  10 * 60 * 1000,
                  "after closing a healthy replica (due to LB), the replica 
will remain in memory "
                  "for this long (ms) for quick recover");
-DSN_DEFINE_int32(replication,
-                 log_shared_file_size_mb,
-                 32,
-                 "shared log maximum segment file size (MB)");
-
 DSN_DEFINE_int32(
     replication,
     mem_release_check_interval_ms,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to