提交 ed61cf61 编写于 作者: K Kenan Yao

Trivial format and comment cleanup.

上级 6833b3c2
...@@ -107,7 +107,7 @@ fillSliceVector(SliceTable *sliceTable, ...@@ -107,7 +107,7 @@ fillSliceVector(SliceTable *sliceTable,
static char * static char *
buildGpQueryString(struct CdbDispatcherState *ds, buildGpQueryString(struct CdbDispatcherState *ds,
DispatchCommandQueryParms * pQueryParms, DispatchCommandQueryParms *pQueryParms,
int *finalLen); int *finalLen);
static void static void
...@@ -238,7 +238,7 @@ cdbdisp_dispatchPlan(struct QueryDesc *queryDesc, ...@@ -238,7 +238,7 @@ cdbdisp_dispatchPlan(struct QueryDesc *queryDesc,
queryDesc->operation == CMD_DELETE) queryDesc->operation == CMD_DELETE)
{ {
MemoryContext oldContext; MemoryContext oldContext;
List *cursors; List *cursors;
oldContext = CurrentMemoryContext; oldContext = CurrentMemoryContext;
if (stmt->qdContext) if (stmt->qdContext)
...@@ -552,10 +552,10 @@ CdbDispatchUtilityStatement(struct Node *stmt, ...@@ -552,10 +552,10 @@ CdbDispatchUtilityStatement(struct Node *stmt,
*/ */
static void static void
cdbdisp_dispatchCommandInternal(const char *strCommand, cdbdisp_dispatchCommandInternal(const char *strCommand,
char *serializedQuerytree, char *serializedQuerytree,
int serializedQuerytreelen, int serializedQuerytreelen,
int flags, int flags,
CdbPgResults *cdb_pgresults) CdbPgResults *cdb_pgresults)
{ {
struct CdbDispatcherState ds = { NULL, NULL, NULL }; struct CdbDispatcherState ds = { NULL, NULL, NULL };
CdbDispatchResults* dispatchresults = NULL; CdbDispatchResults* dispatchresults = NULL;
...@@ -1147,8 +1147,8 @@ cdbdisp_dispatchX(DispatchCommandQueryParms *pQueryParms, ...@@ -1147,8 +1147,8 @@ cdbdisp_dispatchX(DispatchCommandQueryParms *pQueryParms,
int iSlice; int iSlice;
int rootIdx = pQueryParms->rootIdx; int rootIdx = pQueryParms->rootIdx;
char *queryText = NULL; char *queryText = NULL;
int queryTextLength = 0; int queryTextLength = 0;
if (log_dispatch_stats) if (log_dispatch_stats)
ResetUsage(); ResetUsage();
......
...@@ -1665,7 +1665,8 @@ static void InventorySliceTree(Slice ** sliceMap, int sliceIndex, SliceReq * req ...@@ -1665,7 +1665,8 @@ static void InventorySliceTree(Slice ** sliceMap, int sliceIndex, SliceReq * req
static void AssociateSlicesToProcesses(Slice ** sliceMap, int sliceIndex, SliceReq * req); static void AssociateSlicesToProcesses(Slice ** sliceMap, int sliceIndex, SliceReq * req);
/* Function AssignGangs runs on the QD and finishes construction of the /*
* Function AssignGangs runs on the QD and finishes construction of the
* global slice table for a plan by assigning gangs allocated by the * global slice table for a plan by assigning gangs allocated by the
* executor factory to the slices of the slice table. * executor factory to the slices of the slice table.
* *
...@@ -1678,13 +1679,6 @@ static void AssociateSlicesToProcesses(Slice ** sliceMap, int sliceIndex, SliceR ...@@ -1678,13 +1679,6 @@ static void AssociateSlicesToProcesses(Slice ** sliceMap, int sliceIndex, SliceR
* allocate a minimal set of gangs that can satisfy any of the slice trees, * allocate a minimal set of gangs that can satisfy any of the slice trees,
* and associating the allocated gangs with slices in the slice table. * and associating the allocated gangs with slices in the slice table.
* *
* The argument utility_segment_index is the segment index to use for
* 1-gangs that run on QEs.
*
* TODO Currently (July 2005) this argument is always supplied as 0, but
* there are no cases of the planner specifying a fixed Motion to a
* QE, so we don't know the case works.
*
* On successful exit, the CDBProcess lists (primaryProcesses, mirrorProcesses) * On successful exit, the CDBProcess lists (primaryProcesses, mirrorProcesses)
* and the Gang pointers (primaryGang, mirrorGang) are set correctly in each * and the Gang pointers (primaryGang, mirrorGang) are set correctly in each
* slice in the slice table. * slice in the slice table.
...@@ -1702,7 +1696,7 @@ AssignGangs(QueryDesc *queryDesc) ...@@ -1702,7 +1696,7 @@ AssignGangs(QueryDesc *queryDesc)
SliceReq req, SliceReq req,
inv; inv;
/* Make a map so we can access slices quickly by index. */ /* Make a map so we can access slices quickly by index. */
nslices = list_length(sliceTable->slices); nslices = list_length(sliceTable->slices);
sliceMap = (Slice **) palloc(nslices * sizeof(Slice *)); sliceMap = (Slice **) palloc(nslices * sizeof(Slice *));
i = 0; i = 0;
...@@ -1769,7 +1763,6 @@ AssignGangs(QueryDesc *queryDesc) ...@@ -1769,7 +1763,6 @@ AssignGangs(QueryDesc *queryDesc)
} }
/* Use the gangs to construct the CdbProcess lists in slices. */ /* Use the gangs to construct the CdbProcess lists in slices. */
inv.nxtNgang = 0; inv.nxtNgang = 0;
inv.nxt1gang_primary_reader = 0; inv.nxt1gang_primary_reader = 0;
inv.nxt1gang_entrydb_reader = 0; inv.nxt1gang_entrydb_reader = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册