Skip to content

Commit

Permalink
输出一些无用的url注释
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixin.lm committed Feb 23, 2024
1 parent be3bc5c commit 3018416
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 37 deletions.
1 change: 0 additions & 1 deletion src/lib/number/ob_number_format_models.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "lib/number/ob_number_v2.h"
#include "common/ob_object.h"

//see oracle doc Number Format Models: https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm
#define MAX_FMT_STR_LEN 64

namespace oceanbase
Expand Down
1 change: 0 additions & 1 deletion src/lib/utility/ob_fast_convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ class ObFastFormatInt
int64_t len_;
};

//ref: https://github.com/jsteemann/atoi
template<typename T>
class ObFastAtoi
{
Expand Down
4 changes: 1 addition & 3 deletions src/lib/utility/ob_tracepoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ bool &get_tp_switch()
EventItem &item = ::oceanbase::common::EventTable::instance().get_event(event_no); \
item.call(SELECT(1, ##__VA_ARGS__)); })

// doc: https://yuque.antfin-inc.com/ob/sql/ssc2x0

// to check if a certain tracepoint is set
// example: if (E(50) OB_SUCCESS) {...}
// you can also specify condition:
Expand Down Expand Up @@ -240,4 +238,4 @@ class EventTable
}
}

#endif //OCEANBASE_LIB_UTILITY_OB_TRACEPOINT_
#endif //OCEANBASE_LIB_UTILITY_OB_TRACEPOINT_
17 changes: 11 additions & 6 deletions src/obproxy/cmd/ob_show_create_table_handler.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// Copyright 2014-2016 Alibaba Inc. All Rights Reserved.
// Author:
// luoxiaohu.lxh <[email protected]>
// Normalizer:
// luoxiaohu.lxh <[email protected]>
//
/**
* Copyright (c) 2021 OceanBase
* OceanBase Database Proxy(ODP) is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/


#define USING_LOG_PREFIX PROXY_CMD
Expand Down
18 changes: 0 additions & 18 deletions src/obproxy/obutils/ob_config_server_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,6 @@ int ObConfigServerProcessor::get_idc_url(const char *rs_url_buf, const int64_t r
K(idc_url_buf_len), K(ret));
} else {
const char *pos = strcasestr(rs_url_buf, RS_URL_KEY_STRING);
/*
* rs url
* http://x.x.x.x:xxxx/services?Action=ObRootServiceInfo&User_ID=xxx&UID=xxx&ObRegion=xxx
*
* idc url
* http://x.x.x.x:xxxx/services?Action=ObIDCRegionInfo&User_ID=xxx&UID=xxx&ObRegion=xxx
* */
if (NULL != pos) {
const int64_t url_head_len = static_cast<int64_t>(pos - rs_url_buf);
const int64_t url_key_len = static_cast<int64_t>(strlen(RS_URL_KEY_STRING));
Expand All @@ -576,13 +569,6 @@ int ObConfigServerProcessor::get_idc_url(const char *rs_url_buf, const int64_t r
url_tailer_len);
idc_url_buf[url_head_len + IDC_URL_KEY_STRING.length() + url_tailer_len] = '\0';
} else {
/*
* rs url
* http://x.x.x.x:xxxx/oceanbase_obconfig/${cluster_name}
*
* idc url
* http://x.x.x.x:xxxx/oceanbase_obconfig/${cluster_name}
* */
MEMCPY(idc_url_buf, rs_url_buf, rs_url_buf_len);
MEMCPY(idc_url_buf + rs_url_buf_len,
IDC_URL_TAILER_STRING.ptr(),
Expand Down Expand Up @@ -2218,10 +2204,6 @@ int ObConfigServerProcessor::concat_cluster_name_array(char *data, const char *c
ret = OB_INVALID_ARGUMENT;
LOG_WDIAG("NULL pointer, invalid curl or url", K(ret));
} else {
/* 批量逻辑租户接口:
curl --location --request GET 'http://127.0.0.1:8000/services?User_ID=alibaba&UID=HNBC&Action=LdgInstanceInfoBatchQuery' --header 'Content-Type: application/json' --data '{
"LdgClusters": "cluster1,cluster2"}'
*/
char tail[] = "\"}";
int64_t len_data = strlen(data);
int64_t len_cluster_name = strlen(cluster_name_array);
Expand Down
5 changes: 0 additions & 5 deletions src/obproxy/proxy/mysql/ob_mysql_sm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4045,8 +4045,6 @@ uint8_t ObMysqlSM::get_compressed_or_ob20_request_seq()
{
uint8_t seq = 0;
ObProxyProtocol server_protocol = get_server_session_protocol();
// compressed pkt seq use the mysql pkt seq
// if you're confused about this, please check the doc <https://yuque.antfin-inc.com/ob/odp/myfg2mlwo9qiifg7>
if (ObProxyProtocol::PROTOCOL_CHECKSUM == server_protocol) {
// load content of file's response use compressed seq
if (OB_MYSQL_COM_LOAD_DATA_TRANSFER_CONTENT == trans_state_.trans_info_.sql_cmd_) {
Expand Down Expand Up @@ -9838,8 +9836,6 @@ bool ObMysqlSM::need_close_last_used_ss()
common::ObAddr current_addr;
(void)current_addr.set_sockaddr(trans_state_.server_info_.addr_.sa_);
const bool is_current_route_readonly_zone = client_session_->dummy_ldc_.is_readonly_zone(current_addr);
// 当有只读zone存在时,我们期望弱读走只读zone,如果路由策略选择了只读zone,关闭readwrite zone的
// 连接,节约连接资源,参考问题 https://aone.alibaba-inc.com/code/D579173
if (is_last_route_readonly_zone != is_current_route_readonly_zone) {
bret = true;
LOG_INFO("last used server session not match readwrite policy, need close it", K_(sm_id),
Expand Down Expand Up @@ -10198,7 +10194,6 @@ void ObMysqlSM::get_monitor_error_info(int32_t &error_code, ObString &error_msg,
{
const char *msg = NULL;

//错误设计文档: https://yuque.antfin-inc.com/mesh/tech-risk/pr9ggf#DmHdS
if (ObMysqlTransact::TRANSACTION_COMPLETE == trans_state_.current_.state_ || ObMysqlTransact::CMD_COMPLETE == trans_state_.current_.state_) {
ObRespAnalyzeResult &resp = trans_state_.trans_info_.server_response_.get_analyze_result();
if (trans_state_.inner_errcode_ != 0) {
Expand Down
6 changes: 3 additions & 3 deletions src/obproxy/proxy/mysqllib/ob_protocol_diagnosis.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class ObMysqlPacketMetaAnalyzer;
class ObRespResult;
enum ObPacketFoldType {
OB_PACKET_FOLD_TYPE_NONE,
OB_PACKET_FOLD_TYPE_ROW, // https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_query_response_text_resultset_row.html
OB_PACKET_FOLD_TYPE_COL_DEF, // https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_query_response_text_resultset_column_definition.html
OB_PACKET_FOLD_TYPE_ROW,
OB_PACKET_FOLD_TYPE_COL_DEF,
};
enum ObPacketRecordType {
OB_PACKET_RECORD_TYPE_MYSQL = 0,
Expand Down Expand Up @@ -237,4 +237,4 @@ class ObProtocolDiagnosis : public ObSharedRefCount
} // end of obproxy
} // end of oceanbase

#endif
#endif

0 comments on commit 3018416

Please sign in to comment.