Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
acaa03ed
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
acaa03ed
编写于
3月 10, 2022
作者:
X
xy0
提交者:
LINGuanRen
3月 10, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compilation errors when OB_ENABLE_PCH=OFF
上级
7110e4ae
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
118 addition
and
152 deletion
+118
-152
deps/oblib/src/lib/oblog/ob_log_compressor.cpp
deps/oblib/src/lib/oblog/ob_log_compressor.cpp
+1
-0
src/observer/table/ob_table_query_sync_processor.cpp
src/observer/table/ob_table_query_sync_processor.cpp
+36
-35
src/share/backup/ob_log_archive_backup_info_mgr.cpp
src/share/backup/ob_log_archive_backup_info_mgr.cpp
+3
-1
src/share/backup/ob_multi_backup_dest_util.cpp
src/share/backup/ob_multi_backup_dest_util.cpp
+4
-5
src/sql/engine/expr/ob_expr_json_func_helper.cpp
src/sql/engine/expr/ob_expr_json_func_helper.cpp
+74
-111
未找到文件。
deps/oblib/src/lib/oblog/ob_log_compressor.cpp
浏览文件 @
acaa03ed
...
...
@@ -30,6 +30,7 @@
#include "lib/lock/ob_mutex.h"
#include "lib/allocator/ob_malloc.h"
#include "lib/oblog/ob_async_log_struct.h"
#include "lib/thread/ob_thread_name.h"
using
namespace
oceanbase
::
lib
;
...
...
src/observer/table/ob_table_query_sync_processor.cpp
浏览文件 @
acaa03ed
...
...
@@ -10,27 +10,28 @@
* See the Mulan PubL v2 for more details.
*/
#define USING_LOG_PREFIX SERVER
#include "ob_table_query_sync_processor.h"
#include "ob_table_rpc_processor_util.h"
#include "observer/ob_service.h"
#include "storage/ob_partition_service.h"
#include "ob_table_end_trans_cb.h"
#include "sql/optimizer/ob_table_location.h" // ObTableLocation
#include "lib/stat/ob_diagnose_info.h"
#include "lib/stat/ob_session_stat.h"
#include "observer/ob_server.h"
#include "lib/string/ob_strings.h"
using
namespace
oceanbase
::
observer
;
using
namespace
oceanbase
::
common
;
using
namespace
oceanbase
::
table
;
using
namespace
oceanbase
::
share
;
using
namespace
oceanbase
::
sql
;
/**
* ---------------------------------------- ObTableQuerySyncSession ----------------------------------------
*/
#define USING_LOG_PREFIX SERVER
#include "ob_table_query_sync_processor.h"
#include "ob_table_rpc_processor_util.h"
#include "observer/ob_service.h"
#include "storage/ob_partition_service.h"
#include "ob_table_end_trans_cb.h"
#include "sql/optimizer/ob_table_location.h" // ObTableLocation
#include "lib/stat/ob_diagnose_info.h"
#include "lib/stat/ob_session_stat.h"
#include "observer/ob_server.h"
#include "lib/string/ob_strings.h"
#include "lib/rc/ob_rc.h"
using
namespace
oceanbase
::
observer
;
using
namespace
oceanbase
::
common
;
using
namespace
oceanbase
::
table
;
using
namespace
oceanbase
::
share
;
using
namespace
oceanbase
::
sql
;
/**
* ---------------------------------------- ObTableQuerySyncSession ----------------------------------------
*/
int
ObTableQuerySyncSession
::
deep_copy_select_columns
(
const
ObTableQuery
&
query
)
{
int
ret
=
OB_SUCCESS
;
...
...
@@ -44,7 +45,7 @@ int ObTableQuerySyncSession::deep_copy_select_columns(const ObTableQuery &query)
}
else
if
(
OB_FAIL
(
query_
.
add_select_column
(
tmp_str
)))
{
LOG_WARN
(
"failed to add column name"
,
K
(
ret
));
}
}
// end for
}
// end for
return
ret
;
}
...
...
@@ -57,7 +58,8 @@ void ObTableQuerySyncSession::set_result_iterator(ObNormalTableQueryResultIterat
}
}
int
ObTableQuerySyncSession
::
init
()
{
int
ObTableQuerySyncSession
::
init
()
{
int
ret
=
OB_SUCCESS
;
lib
::
MemoryContext
mem_context
=
nullptr
;
lib
::
ContextParam
param
;
...
...
@@ -164,9 +166,9 @@ int ObQuerySyncMgr::get_query_session(uint64_t sessid, ObTableQuerySyncSession *
}
else
if
(
OB_ISNULL
(
query_session
))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"Unexpected null query session"
,
K
(
ret
),
K
(
sessid
));
}
else
if
(
query_session
->
is_in_use
())
{
// one session cannot be held concurrently
}
else
if
(
query_session
->
is_in_use
())
{
// one session cannot be held concurrently
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"query session already in use"
,
K
(
sessid
));
LOG_WARN
(
"query session already in use"
,
K
(
sessid
));
}
else
{
query_session
->
set_in_use
(
true
);
}
...
...
@@ -225,8 +227,7 @@ void ObQuerySyncMgr::clean_timeout_query_session()
LOG_WARN
(
"clean timeout query session success"
,
K
(
ret
),
K
(
sess_id
));
}
get_locker
(
sess_id
).
unlock
();
}
}
}
}
...
...
@@ -249,7 +250,8 @@ ObTableQuerySyncSession *ObQuerySyncMgr::alloc_query_session()
return
query_session
;
}
int
ObQuerySyncMgr
::
ObGetAllSessionIdOp
::
operator
()(
QuerySessionPair
&
entry
)
{
int
ObQuerySyncMgr
::
ObGetAllSessionIdOp
::
operator
()(
QuerySessionPair
&
entry
)
{
int
ret
=
OB_SUCCESS
;
if
(
OB_FAIL
(
session_id_array_
.
push_back
(
entry
.
first
)))
{
LOG_WARN
(
"fail to push back query session id"
,
K
(
ret
));
...
...
@@ -429,7 +431,7 @@ int ObTableQuerySyncP::query_scan_with_new_context(
ret
=
OB_SUCCESS
;
result_
.
is_end_
=
true
;
}
}
else
if
(
result_iterator
->
has_more_result
()){
}
else
if
(
result_iterator
->
has_more_result
())
{
result_
.
is_end_
=
false
;
query_session
->
deep_copy_select_columns
(
arg_
.
query_
);
query_session
->
set_result_iterator
(
dynamic_cast
<
ObNormalTableQueryResultIterator
*>
(
result_iterator
));
...
...
@@ -445,8 +447,7 @@ int ObTableQuerySyncP::query_scan_with_init()
table_service_ctx_
=
query_session_
->
get_table_service_ctx
();
table_service_ctx_
->
scan_param_
.
is_thread_scope_
=
false
;
uint64_t
&
table_id
=
table_service_ctx_
->
param_table_id
();
table_service_ctx_
->
init_param
(
timeout_ts_
,
table_service_ctx_
->
init_param
(
timeout_ts_
,
this
,
query_session_
->
get_allocator
(),
false
/*ignored*/
,
...
...
@@ -465,8 +466,8 @@ int ObTableQuerySyncP::query_scan_with_init()
ret
=
OB_NOT_SUPPORTED
;
LOG_WARN
(
"should have one partition"
,
K
(
ret
),
K
(
part_ids
));
}
else
if
(
FALSE_IT
(
table_service_ctx_
->
param_partition_id
()
=
part_ids
.
at
(
0
)))
{
}
else
if
(
OB_FAIL
(
start_trans
(
is_readonly
,
sql
::
stmt
::
T_SELECT
,
consistency_level
,
table_id
,
part_ids
,
timeout_ts_
)))
{
}
else
if
(
OB_FAIL
(
start_trans
(
is_readonly
,
sql
::
stmt
::
T_SELECT
,
consistency_level
,
table_id
,
part_ids
,
timeout_ts_
)))
{
LOG_WARN
(
"failed to start readonly transaction"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
table_service_
->
execute_query
(
*
table_service_ctx_
,
arg_
.
query_
,
result_
,
result_iterator
)))
{
if
(
OB_TRY_LOCK_ROW_CONFLICT
!=
ret
)
{
...
...
@@ -533,7 +534,7 @@ int ObTableQuerySyncP::try_process()
}
else
{
if
(
ObQueryOperationType
::
QUERY_START
==
arg_
.
query_type_
)
{
ret
=
process_query_start
();
}
else
if
(
ObQueryOperationType
::
QUERY_NEXT
==
arg_
.
query_type_
)
{
}
else
if
(
ObQueryOperationType
::
QUERY_NEXT
==
arg_
.
query_type_
)
{
ret
=
process_query_next
();
}
if
(
OB_FAIL
(
ret
))
{
...
...
@@ -581,7 +582,7 @@ int ObTableQuerySyncP::check_query_type()
{
int
ret
=
OB_SUCCESS
;
if
(
arg_
.
query_type_
!=
table
::
ObQueryOperationType
::
QUERY_START
&&
arg_
.
query_type_
!=
table
::
ObQueryOperationType
::
QUERY_NEXT
)
{
arg_
.
query_type_
!=
table
::
ObQueryOperationType
::
QUERY_NEXT
)
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid query operation type"
,
K
(
ret
),
K
(
arg_
.
query_type_
));
}
...
...
src/share/backup/ob_log_archive_backup_info_mgr.cpp
浏览文件 @
acaa03ed
...
...
@@ -23,6 +23,8 @@
#include "ob_backup_path.h"
#include "ob_backup_file_lock_mgr.h"
#include "lib/utility/ob_tracepoint.h"
#include "lib/container/ob_array.h"
#include "lib/container/ob_array_iterator.h"
using
namespace
oceanbase
;
using
namespace
common
;
...
...
@@ -668,7 +670,7 @@ int ObLogArchiveBackupInfoMgr::get_log_archive_backup_backup_info(
}
else
if
(
OB_FAIL
(
result
->
next
())
&&
OB_ITER_END
!=
ret
)
{
OB_LOG
(
WARN
,
"fail to get next result"
,
K
(
ret
),
K
(
sql
));
}
else
if
(
OB_UNLIKELY
(
OB_ITER_END
==
ret
))
{
//
仅租户级归档backup info未持久化之前获取出现OB_ITER_END的情况
//
only for tenant:OB_ITER_END happen before backup info is persisted
ret
=
OB_ENTRY_NOT_EXIST
;
OB_LOG
(
WARN
,
"tenant backup info not exist"
,
K
(
ret
),
K
(
tenant_id
),
K
(
sql
));
}
else
if
(
OB_ISNULL
(
result
))
{
...
...
src/share/backup/ob_multi_backup_dest_util.cpp
浏览文件 @
acaa03ed
...
...
@@ -21,7 +21,8 @@
#include "share/backup/ob_log_archive_backup_info_mgr.h"
#include "lib/restore/ob_storage.h"
#include "share/backup/ob_backup_info_mgr.h"
#include "lib/container/ob_array.h"
#include "lib/container/ob_array_iterator.h"
using
namespace
oceanbase
::
common
;
using
namespace
oceanbase
::
share
;
...
...
@@ -499,8 +500,7 @@ int ObMultiBackupDestUtil::check_can_restore_by_set_or_piece(
bool
set_exist
=
false
;
if
(
OB_FAIL
(
get_backup_set_info_path
(
simple_path
.
get_simple_path
(),
backup_set_path
)))
{
LOG_WARN
(
"failed to get backup set info path"
,
KR
(
ret
),
K_
(
simple_path
.
backup_dest
));
}
else
if
(
OB_FAIL
(
util
.
is_exist
(
backup_set_path
.
get_obstr
(),
simple_path
.
get_storage_info
(),
set_exist
)))
{
}
else
if
(
OB_FAIL
(
util
.
is_exist
(
backup_set_path
.
get_obstr
(),
simple_path
.
get_storage_info
(),
set_exist
)))
{
LOG_WARN
(
"failed to check set file exist"
,
KR
(
ret
),
K
(
backup_set_path
));
}
else
if
(
!
set_exist
)
{
ret
=
OB_BACKUP_FILE_NOT_EXIST
;
...
...
@@ -513,8 +513,7 @@ int ObMultiBackupDestUtil::check_can_restore_by_set_or_piece(
bool
piece_exist
=
false
;
if
(
OB_FAIL
(
get_backup_piece_info_path
(
simple_path
.
get_simple_path
(),
backup_piece_path
)))
{
LOG_WARN
(
"failed to get backup piece info path"
,
KR
(
ret
),
K_
(
simple_path
.
backup_dest
));
}
else
if
(
OB_FAIL
(
util
.
is_exist
(
backup_piece_path
.
get_obstr
(),
simple_path
.
get_storage_info
(),
piece_exist
)))
{
}
else
if
(
OB_FAIL
(
util
.
is_exist
(
backup_piece_path
.
get_obstr
(),
simple_path
.
get_storage_info
(),
piece_exist
)))
{
LOG_WARN
(
"failed to check piece file exist"
,
KR
(
ret
),
K
(
backup_piece_path
));
}
else
if
(
!
piece_exist
)
{
ret
=
OB_BACKUP_FILE_NOT_EXIST
;
...
...
src/sql/engine/expr/ob_expr_json_func_helper.cpp
浏览文件 @
acaa03ed
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录