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

feat(bulk_load): add replica-level bulk load reject write counter #895

Merged
merged 1 commit into from
Aug 31, 2021
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
4 changes: 4 additions & 0 deletions src/replica/replica.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ replica::replica(
_counter_recent_write_splitting_reject_count.init_app_counter(
"eon.replica", counter_str.c_str(), COUNTER_TYPE_VOLATILE_NUMBER, counter_str.c_str());

counter_str = fmt::format("recent.write.bulk.load.ingestion.reject.count@{}", gpid);
_counter_recent_write_bulk_load_ingestion_reject_count.init_app_counter(
"eon.replica", counter_str.c_str(), COUNTER_TYPE_VOLATILE_NUMBER, counter_str.c_str());

// init table level latency perf counters
init_table_level_latency_counters();

Expand Down
1 change: 1 addition & 0 deletions src/replica/replica.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ class replica : public serverlet<replica>, public ref_counter, public replica_ba
perf_counter_wrapper _counter_recent_backup_request_throttling_reject_count;
perf_counter_wrapper _counter_recent_write_splitting_reject_count;
perf_counter_wrapper _counter_recent_read_splitting_reject_count;
perf_counter_wrapper _counter_recent_write_bulk_load_ingestion_reject_count;
std::vector<perf_counter *> _counters_table_level_latency;
perf_counter_wrapper _counter_dup_disabled_non_idempotent_write_count;
perf_counter_wrapper _counter_backup_request_qps;
Expand Down
2 changes: 1 addition & 1 deletion src/replica/replica_2pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void replica::on_client_write(dsn::message_ex *request, bool ignore_throttling)
if (_is_bulk_load_ingestion) {
if (request->rpc_code() != dsn::apps::RPC_RRDB_RRDB_BULK_LOAD) {
// reject write requests during ingestion
_stub->_counter_bulk_load_ingestion_reject_write_count->increment();
_counter_recent_write_bulk_load_ingestion_reject_count->increment();
response_client_write(request, ERR_OPERATION_DISABLED);
} else {
response_client_write(request, ERR_NO_NEED_OPERATE);
Expand Down
5 changes: 0 additions & 5 deletions src/replica/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,6 @@ void replica_stub::install_perf_counters()
"bulk.load.failed.count",
COUNTER_TYPE_VOLATILE_NUMBER,
"current bulk load failed count");
_counter_bulk_load_ingestion_reject_write_count.init_app_counter(
"eon.replica_stub",
"bulk.load.ingestion.reject.write.count",
COUNTER_TYPE_VOLATILE_NUMBER,
"bulk load ingestion reject write requests count");
_counter_bulk_load_download_file_succ_count.init_app_counter(
"eon.replica_stub",
"bulk.load.download.file.success.count",
Expand Down
1 change: 0 additions & 1 deletion src/replica/replica_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ class replica_stub : public serverlet<replica_stub>, public ref_counter
perf_counter_wrapper _counter_bulk_load_ingestion_count;
perf_counter_wrapper _counter_bulk_load_succeed_count;
perf_counter_wrapper _counter_bulk_load_failed_count;
perf_counter_wrapper _counter_bulk_load_ingestion_reject_write_count;
perf_counter_wrapper _counter_bulk_load_download_file_succ_count;
perf_counter_wrapper _counter_bulk_load_download_file_fail_count;
perf_counter_wrapper _counter_bulk_load_download_file_size;
Expand Down