Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a2ecd1fa
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a2ecd1fa
编写于
6月 22, 2016
作者:
G
Gang Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unnecessary argument of cdbdisp_makeDispatcherState
上级
fd57666f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
27 deletion
+12
-27
src/backend/cdb/dispatcher/cdbdisp.c
src/backend/cdb/dispatcher/cdbdisp.c
+4
-5
src/backend/cdb/dispatcher/cdbdisp_dtx.c
src/backend/cdb/dispatcher/cdbdisp_dtx.c
+1
-2
src/backend/cdb/dispatcher/cdbdisp_query.c
src/backend/cdb/dispatcher/cdbdisp_query.c
+3
-5
src/backend/cdb/dispatcher/cdbdisp_thread.c
src/backend/cdb/dispatcher/cdbdisp_thread.c
+1
-9
src/backend/cdb/dispatcher/cdbdispatchresult.c
src/backend/cdb/dispatcher/cdbdispatchresult.c
+2
-2
src/include/cdb/cdbdisp.h
src/include/cdb/cdbdisp.h
+0
-2
src/include/cdb/cdbdispatchresult.h
src/include/cdb/cdbdispatchresult.h
+1
-2
未找到文件。
src/backend/cdb/dispatcher/cdbdisp.c
浏览文件 @
a2ecd1fa
...
...
@@ -318,12 +318,12 @@ cdbdisp_handleError(struct CdbDispatcherState *ds)
*
* Call cdbdisp_destroyDispatcherState to free it.
*
* maxResults: max number of results, normally equals to max number of QEs.
* maxSlices: max number of slices of the query/command.
*/
void
cdbdisp_makeDispatcherState
(
CdbDispatcherState
*
ds
,
int
maxResults
,
int
maxSlices
,
bool
cancelOnError
)
cdbdisp_makeDispatcherState
(
CdbDispatcherState
*
ds
,
int
maxSlices
,
bool
cancelOnError
)
{
MemoryContext
oldContext
=
NULL
;
...
...
@@ -339,8 +339,7 @@ cdbdisp_makeDispatcherState(CdbDispatcherState * ds, int maxResults,
ALLOCSET_DEFAULT_MAXSIZE
);
oldContext
=
MemoryContextSwitchTo
(
ds
->
dispatchStateContext
);
ds
->
primaryResults
=
cdbdisp_makeDispatchResults
(
maxResults
,
maxSlices
,
ds
->
primaryResults
=
cdbdisp_makeDispatchResults
(
maxSlices
,
cancelOnError
);
ds
->
dispatchThreads
=
cdbdisp_makeDispatchThreads
(
maxSlices
);
MemoryContextSwitchTo
(
oldContext
);
...
...
src/backend/cdb/dispatcher/cdbdisp_dtx.c
浏览文件 @
a2ecd1fa
...
...
@@ -88,7 +88,6 @@ cdbdisp_dispatchDtxProtocolCommand(DtxProtocolCommand dtxProtocolCommand,
DispatchCommandDtxProtocolParms
dtxProtocolParms
;
Gang
*
primaryGang
;
int
nsegdb
=
getgpsegmentCount
();
elog
((
Debug_print_full_dtm
?
LOG
:
DEBUG5
),
"cdbdisp_dispatchDtxProtocolCommand: %s for gid = %s, direct content #: %d"
,
...
...
@@ -125,7 +124,7 @@ cdbdisp_dispatchDtxProtocolCommand(DtxProtocolCommand dtxProtocolCommand,
/*
* Dispatch the command.
*/
cdbdisp_makeDispatcherState
(
&
ds
,
nsegdb
,
0
,
/* cancelOnError */
false
);
cdbdisp_makeDispatcherState
(
&
ds
,
/* slice count */
1
,
/* cancelOnError */
false
);
cdbdisp_dtxParmsInit
(
&
ds
,
&
dtxProtocolParms
);
ds
.
primaryResults
->
writer_gang
=
primaryGang
;
...
...
src/backend/cdb/dispatcher/cdbdisp_query.c
浏览文件 @
a2ecd1fa
...
...
@@ -511,7 +511,6 @@ cdbdisp_dispatchCommand(const char *strCommand,
{
DispatchCommandQueryParms
queryParms
;
Gang
*
primaryGang
;
int
nsegdb
=
getgpsegmentCount
();
CdbComponentDatabaseInfo
*
qdinfo
;
if
(
log_dispatch_stats
)
...
...
@@ -560,7 +559,7 @@ cdbdisp_dispatchCommand(const char *strCommand,
*/
ds
->
primaryResults
=
NULL
;
ds
->
dispatchThreads
=
NULL
;
cdbdisp_makeDispatcherState
(
ds
,
nsegdb
,
0
,
cancelOnError
);
cdbdisp_makeDispatcherState
(
ds
,
/*slice count*/
1
,
cancelOnError
);
cdbdisp_queryParmsInit
(
ds
,
&
queryParms
);
ds
->
primaryResults
->
writer_gang
=
primaryGang
;
...
...
@@ -1272,7 +1271,7 @@ cdbdisp_dispatchX(DispatchCommandQueryParms *pQueryParms,
ds
->
primaryResults
=
NULL
;
ds
->
dispatchThreads
=
NULL
;
cdbdisp_makeDispatcherState
(
ds
,
nSlices
*
largestGangsize
(),
nSlices
,
cancelOnError
);
cdbdisp_makeDispatcherState
(
ds
,
nSlices
,
cancelOnError
);
cdbdisp_queryParmsInit
(
ds
,
pQueryParms
);
cdb_total_plans
++
;
...
...
@@ -1441,7 +1440,6 @@ cdbdisp_dispatchSetCommandToAllGangs(const char *strCommand,
List
*
allocatedReaderGangs
;
ListCell
*
le
;
int
nsegdb
=
getgpsegmentCount
();
int
gangCount
;
MemSet
(
&
queryParms
,
0
,
sizeof
(
queryParms
));
...
...
@@ -1478,7 +1476,7 @@ cdbdisp_dispatchSetCommandToAllGangs(const char *strCommand,
ds
->
primaryResults
=
NULL
;
ds
->
dispatchThreads
=
NULL
;
cdbdisp_makeDispatcherState
(
ds
,
nsegdb
*
gangCount
,
gangCount
,
cancelOnError
);
cdbdisp_makeDispatcherState
(
ds
,
gangCount
,
cancelOnError
);
cdbdisp_queryParmsInit
(
ds
,
&
queryParms
);
ds
->
primaryResults
->
writer_gang
=
primaryGang
;
...
...
src/backend/cdb/dispatcher/cdbdisp_thread.c
浏览文件 @
a2ecd1fa
...
...
@@ -394,15 +394,7 @@ CdbDispatchCmdThreads *
cdbdisp_makeDispatchThreads
(
int
maxSlices
)
{
int
maxThreadsPerGang
=
getMaxThreadsPerGang
();
/*
* the maximum number of command parameter blocks we'll possibly need is
* * one for each slice on the primary gang. Max sure that we
* * have enough -- once we've created the command block we're stuck with it
* * for the duration of this statement (including CDB-DTM ).
* * X 2 for good measure ?
*/
int
maxThreads
=
maxThreadsPerGang
*
4
*
Max
(
maxSlices
,
5
);
int
maxThreads
=
maxThreadsPerGang
*
maxSlices
;
int
maxConn
=
gp_connections_per_thread
;
int
size
=
0
;
...
...
src/backend/cdb/dispatcher/cdbdispatchresult.c
浏览文件 @
a2ecd1fa
...
...
@@ -887,11 +887,11 @@ cdbdisp_checkResultsErrcode(struct CdbDispatchResults *meleeResults)
* memory context.
*/
CdbDispatchResults
*
cdbdisp_makeDispatchResults
(
int
resultCapacity
,
int
sliceCapacity
,
cdbdisp_makeDispatchResults
(
int
sliceCapacity
,
bool
cancelOnError
)
{
CdbDispatchResults
*
results
=
palloc0
(
sizeof
(
*
results
));
int
resultCapacity
=
largestGangsize
()
*
sliceCapacity
;
int
nbytes
=
resultCapacity
*
sizeof
(
results
->
resultArray
[
0
]);
results
->
resultArray
=
palloc0
(
nbytes
);
...
...
src/include/cdb/cdbdisp.h
浏览文件 @
a2ecd1fa
...
...
@@ -129,12 +129,10 @@ cdbdisp_handleError(struct CdbDispatcherState *ds);
*
* Call cdbdisp_destroyDispatcherState to free it.
*
* maxResults: max number of results, normally equals to max number of QEs.
* maxSlices: max number of slices of the query/command.
*/
void
cdbdisp_makeDispatcherState
(
CdbDispatcherState
*
ds
,
int
maxResults
,
int
maxSlices
,
bool
cancelOnError
);
...
...
src/include/cdb/cdbdispatchresult.h
浏览文件 @
a2ecd1fa
...
...
@@ -316,8 +316,7 @@ cdbdisp_checkResultsErrcode(struct CdbDispatchResults *meeleResults);
* memory context.
*/
CdbDispatchResults
*
cdbdisp_makeDispatchResults
(
int
resultCapacity
,
int
sliceCapacity
,
cdbdisp_makeDispatchResults
(
int
sliceCapacity
,
bool
cancelOnError
);
#endif
/* CDBDISPATCHRESULT_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录