[CP] [OBCDC] Fix response of locate_start_lsn rpc
This commit is contained in:
@ -119,6 +119,12 @@ install(
|
|||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
COMPONENT cdc
|
COMPONENT cdc
|
||||||
)
|
)
|
||||||
|
install(
|
||||||
|
DIRECTORY
|
||||||
|
${PROJECT_SOURCE_DIR}/src/logservice/libobcdc/tests/scripts/
|
||||||
|
DESTINATION ${CMAKE_INSTALL_RUNSTATEDIR}
|
||||||
|
COMPONENT cdc
|
||||||
|
)
|
||||||
|
|
||||||
if(OB_BUILD_OPENSOURCE)
|
if(OB_BUILD_OPENSOURCE)
|
||||||
install(
|
install(
|
||||||
|
|||||||
@ -136,7 +136,7 @@ int ObCdcStartLsnLocator::do_req_start_lsn_(const ObLocateLSNByTsReq &req,
|
|||||||
ret = OB_IN_STOP_STATE;
|
ret = OB_IN_STOP_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTLOG_LOG(INFO, "locator req success", KR(ret), K(tenant_id_), K(req), K(resp), K(is_hurry_quit));
|
EXTLOG_LOG(INFO, "locator req done", KR(ret), K(tenant_id_), K(req), K(resp), K(is_hurry_quit));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -185,7 +185,7 @@ int ObCdcStartLsnLocator::do_locate_ls_(const bool fetch_archive_only,
|
|||||||
need_seek_archive = true;
|
need_seek_archive = true;
|
||||||
} else {
|
} else {
|
||||||
if (OB_FAIL(init_palf_handle_guard_(ls_id, palf_handle_guard))) {
|
if (OB_FAIL(init_palf_handle_guard_(ls_id, palf_handle_guard))) {
|
||||||
if (OB_LS_NOT_EXIST == ret) {
|
if (OB_LS_NOT_EXIST == ret && OB_SYS_TENANT_ID != tenant_id_) {
|
||||||
ret = OB_SUCCESS;
|
ret = OB_SUCCESS;
|
||||||
need_seek_archive = true;
|
need_seek_archive = true;
|
||||||
} else {
|
} else {
|
||||||
@ -195,7 +195,7 @@ int ObCdcStartLsnLocator::do_locate_ls_(const bool fetch_archive_only,
|
|||||||
// - OB_ENTRY_NOT_EXIST: there is no log's log_ts is higher than ts_ns
|
// - OB_ENTRY_NOT_EXIST: there is no log's log_ts is higher than ts_ns
|
||||||
// - OB_ERR_OUT_OF_LOWER_BOUND: ts_ns is too old, log files may have been recycled
|
// - OB_ERR_OUT_OF_LOWER_BOUND: ts_ns is too old, log files may have been recycled
|
||||||
} else if (OB_FAIL(palf_handle_guard.seek(start_scn, group_iter))) {
|
} else if (OB_FAIL(palf_handle_guard.seek(start_scn, group_iter))) {
|
||||||
if (OB_ERR_OUT_OF_LOWER_BOUND == ret) {
|
if (OB_ERR_OUT_OF_LOWER_BOUND == ret && OB_SYS_TENANT_ID != tenant_id_) {
|
||||||
ret = OB_SUCCESS;
|
ret = OB_SUCCESS;
|
||||||
need_seek_archive = true;
|
need_seek_archive = true;
|
||||||
} else {
|
} else {
|
||||||
@ -208,10 +208,6 @@ int ObCdcStartLsnLocator::do_locate_ls_(const bool fetch_archive_only,
|
|||||||
} else {
|
} else {
|
||||||
result_ts_ns = log_group_entry.get_scn().get_val_for_logservice();
|
result_ts_ns = log_group_entry.get_scn().get_val_for_logservice();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OB_SYS_TENANT_ID == tenant_id_) {
|
|
||||||
need_seek_archive = false;
|
|
||||||
}
|
|
||||||
// Note: us
|
// Note: us
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -92,7 +92,7 @@ void ObCDCAutoConfigMgr::init_queue_length_(const ObLogConfig &config)
|
|||||||
|
|
||||||
const int64_t msg_sorter_queue_length = br_queue_length;
|
const int64_t msg_sorter_queue_length = br_queue_length;
|
||||||
REFRESH_NUM_FIELD_WITH_CONFIG(msg_sorter_task_count_upper_limit, msg_sorter_queue_length, config.msg_sorter_task_count_upper_limit.get());
|
REFRESH_NUM_FIELD_WITH_CONFIG(msg_sorter_task_count_upper_limit, msg_sorter_queue_length, config.msg_sorter_task_count_upper_limit.get());
|
||||||
REFRESH_NUM_FIELD_WITH_CONFIG(sequencer_queue_length, MAX_QUEUE_LENGTH, config.sequencer_queue_length.get());
|
REFRESH_NUM_FIELD_WITH_CONFIG(sequencer_queue_length, MAX_QUEUE_LENGTH / 10, config.sequencer_queue_length.get());
|
||||||
REFRESH_NUM_FIELD_WITH_CONFIG(storager_queue_length, DEFAULT_STORAGE_QUEUE_LENGTH, config.storager_queue_length.get());
|
REFRESH_NUM_FIELD_WITH_CONFIG(storager_queue_length, DEFAULT_STORAGE_QUEUE_LENGTH, config.storager_queue_length.get());
|
||||||
REFRESH_NUM_FIELD_WITH_CONFIG(reader_queue_length, DEFAULT_STORAGE_QUEUE_LENGTH, config.reader_queue_length.get());
|
REFRESH_NUM_FIELD_WITH_CONFIG(reader_queue_length, DEFAULT_STORAGE_QUEUE_LENGTH, config.reader_queue_length.get());
|
||||||
}
|
}
|
||||||
|
|||||||
1
src/logservice/libobcdc/tests/scripts/kill_obcdc.sh
Executable file
1
src/logservice/libobcdc/tests/scripts/kill_obcdc.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
cat run/libobcdc.pid | xargs kill -9
|
||||||
33
src/logservice/libobcdc/tests/scripts/libobcdc.conf
Normal file
33
src/logservice/libobcdc/tests/scripts/libobcdc.conf
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
######### [cluster_info] #########
|
||||||
|
cluster_db_name=oceanbase
|
||||||
|
cluster_password=
|
||||||
|
cluster_user=
|
||||||
|
cluster_url=
|
||||||
|
|
||||||
|
######### [working_mode] #########
|
||||||
|
#working_mode=memory
|
||||||
|
meta_data_refresh_mode=data_dict
|
||||||
|
#meta_data_refresh_mode=online
|
||||||
|
|
||||||
|
######### [synchronous information] #########
|
||||||
|
tb_white_list=*.*.*
|
||||||
|
#tb_white_list=sys.oblog*.*|oblog_tt.*.*
|
||||||
|
tb_black_list=*.*.*_t|*.*.*_[0-9][a-z]
|
||||||
|
|
||||||
|
|
||||||
|
######### [log] #########
|
||||||
|
log_level=ALL.*:INFO;PALF.*:WARN;SHARE.SCHEMA:WARN;TLOG.FETCHER:INFO;TLOG.FORMATTER:INFO;
|
||||||
|
#log_level=ALL.*:DEBUG;
|
||||||
|
|
||||||
|
skip_dirty_data=0
|
||||||
|
skip_ob_version_compat_check=1
|
||||||
|
#enable_output_hidden_primary_key=1
|
||||||
|
#print_participant_not_serve_info=1
|
||||||
|
|
||||||
|
mysql_connect_timeout_sec=40
|
||||||
|
mysql_query_timeout_sec=30
|
||||||
|
|
||||||
|
######### [flow controll] #########
|
||||||
|
memory_limit=8G
|
||||||
|
pause_redo_dispatch_task_count_threshold=80
|
||||||
|
memory_usage_warn_threshold=85
|
||||||
33
src/logservice/libobcdc/tests/scripts/start.sh
Executable file
33
src/logservice/libobcdc/tests/scripts/start.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TIMESTAMP=`date -d "2023-6-16 19:30:31" +%s`
|
||||||
|
TIMESTAMP=0
|
||||||
|
|
||||||
|
CONFIG=conf/libobcdc.conf
|
||||||
|
DATA_FILE=data/data.log
|
||||||
|
|
||||||
|
RUN_TIME=60
|
||||||
|
|
||||||
|
LOG_DIR=./log
|
||||||
|
|
||||||
|
./kill_obcdc.sh
|
||||||
|
|
||||||
|
rm -fr $LOG_DIR/ core.* ${DATA_FILE}*
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=./lib/:$LD_LIBRARY_PATH
|
||||||
|
./obcdc_tailf -v
|
||||||
|
ulimit -c unlimited
|
||||||
|
## work in background
|
||||||
|
`pwd`/obcdc_tailf -f $CONFIG -t $TIMESTAMP -d
|
||||||
|
#`pwd`/obcdc_tailf -f $CONFIG -T $TIMESTAMP -d
|
||||||
|
#./obcdc_tailf_static -f $CONFIG -T $TIMESTAMP -d
|
||||||
|
#`pwd`/obcdc_tailf -f $CONFIG -T $TIMESTAMP -D${DATA_FILE} -d
|
||||||
|
|
||||||
|
# Timed runs in the background
|
||||||
|
# `pwd`/obcdc_tailf -R $RUN_TIME -f $CONFIG -t $TIMESTAMP -d
|
||||||
|
|
||||||
|
# output data
|
||||||
|
# `pwd`/obcdc_tailf -V -f $CONFIG -T $TIMESTAMP -D${DATA_FILE} 2>&1 | grep -v tid
|
||||||
|
|
||||||
|
# Timed runs with output data
|
||||||
|
# `pwd`/obcdc_tailf -x -o -R$RUN_TIME -f $CONFIG -t $TIMESTAMP -D${DATA_FILE} 2>&1 | grep -v tid
|
||||||
3
src/logservice/libobcdc/tests/scripts/top.sh
Executable file
3
src/logservice/libobcdc/tests/scripts/top.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
PID=`cat run/libobcdc.pid`
|
||||||
|
|
||||||
|
top -d 1 -p $PID
|
||||||
4
src/logservice/libobcdc/tests/scripts/watch_delay.sh
Executable file
4
src/logservice/libobcdc/tests/scripts/watch_delay.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
LOG_FILE=log/libobcdc.log
|
||||||
|
|
||||||
|
watch -n 1 "if [ -f $LOG_FILE ]; then grep MIN_DELAY $LOG_FILE | grep HEARTBEAT | awk '{print \$11, \$12, \$13}' | tail -n 3; fi"
|
||||||
4
src/logservice/libobcdc/tests/scripts/watch_tps.sh
Executable file
4
src/logservice/libobcdc/tests/scripts/watch_tps.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
LOG_FILE=log/libobcdc.log
|
||||||
|
|
||||||
|
watch -n 1 "if [ -f $LOG_FILE ]; then grep NEXT_RECORD_TPS $LOG_FILE | awk '{print \$1, \$2, \$10, \$11, \$12, \$13}' | tail -n 3; fi"
|
||||||
3
src/logservice/libobcdc/tests/scripts/watch_traffic.sh
Executable file
3
src/logservice/libobcdc/tests/scripts/watch_traffic.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
LOG=log/libobcdc.log
|
||||||
|
|
||||||
|
watch -n 1 "if [ -f $LOG ]; then grep traffic $LOG | grep -v traffic=0.00B | awk '{printf(\"%-26s %-13s %-10s %-10s %-14s %-12s %-18s %-28s %-25s %-26s\n\", \$10, \$11, \$12, \$13, \$14, \$15, \$17, \$18, \$19, \$20);}' | tail -n 3; fi"
|
||||||
Reference in New Issue
Block a user