Skip to content

Commit

Permalink
feat(slog): Remove slog related code (2nd) (apache#1871)
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 authored Jan 25, 2024
1 parent 5ea6089 commit 1206e6a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 40 deletions.
6 changes: 0 additions & 6 deletions src/common/replication_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
27 changes: 2 additions & 25 deletions src/replica/replica_2pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
9 changes: 0 additions & 9 deletions src/replica/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1206e6a

Please sign in to comment.