Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
f6006651
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,发现更多精彩内容 >>
提交
f6006651
编写于
2月 14, 2017
作者:
H
Heikki Linnakangas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove dead code.
And other misc cleeanup.
上级
d09cf2e6
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
15 addition
and
156 deletion
+15
-156
src/backend/cdb/cdbvars.c
src/backend/cdb/cdbvars.c
+2
-2
src/backend/cdb/motion/cdbmotion.c
src/backend/cdb/motion/cdbmotion.c
+1
-8
src/backend/cdb/motion/ic_common.c
src/backend/cdb/motion/ic_common.c
+0
-74
src/backend/cdb/motion/ic_udpifc.c
src/backend/cdb/motion/ic_udpifc.c
+4
-5
src/backend/cdb/motion/tupser.c
src/backend/cdb/motion/tupser.c
+0
-2
src/include/cdb/cdbinterconnect.h
src/include/cdb/cdbinterconnect.h
+1
-3
src/include/cdb/cdbmotion.h
src/include/cdb/cdbmotion.h
+0
-6
src/include/cdb/cdbvars.h
src/include/cdb/cdbvars.h
+0
-5
src/include/cdb/ml_ipc.h
src/include/cdb/ml_ipc.h
+7
-51
未找到文件。
src/backend/cdb/cdbvars.c
浏览文件 @
f6006651
...
...
@@ -739,7 +739,7 @@ GpVars_Verbosity gp_log_interconnect;
/*
* gpvars_string_to_verbosity
*/
GpVars_Verbosity
static
GpVars_Verbosity
gpvars_string_to_verbosity
(
const
char
*
s
)
{
GpVars_Verbosity
result
;
...
...
@@ -762,7 +762,7 @@ gpvars_string_to_verbosity(const char *s)
/*
* gpvars_verbosity_to_string
*/
const
char
*
static
const
char
*
gpvars_verbosity_to_string
(
GpVars_Verbosity
verbosity
)
{
switch
(
verbosity
)
...
...
src/backend/cdb/motion/cdbmotion.c
浏览文件 @
f6006651
...
...
@@ -12,7 +12,7 @@
#include "postgres.h"
#include "miscadmin.h"
#include "access/h
eapam
.h"
#include "access/h
tup
.h"
#include "cdb/cdbconn.h"
#include "nodes/execnodes.h" //SliceTable
#include "cdb/cdbmotion.h"
...
...
@@ -21,7 +21,6 @@
#include "cdb/ml_ipc.h"
#include "cdb/tupser.h"
#include "libpq/pqformat.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
...
...
@@ -482,12 +481,6 @@ SendTuple(MotionLayerState *mlStates,
return
rc
;
}
TupleChunkListItem
get_eos_tuplechunklist
(
void
)
{
return
s_eos_chunk_data
;
}
/*
* Sends a token to all peer Motion Nodes, indicating that this motion
* node has no more tuples to send out.
...
...
src/backend/cdb/motion/ic_common.c
浏览文件 @
f6006651
...
...
@@ -8,15 +8,6 @@
*-------------------------------------------------------------------------
*/
#ifdef WIN32
/*
* Need this to get WSAPoll (poll). And it
* has to be set before any header from the Win32 API is loaded.
*/
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif
#include "postgres.h"
#include "nodes/execnodes.h"
/* Slice, SliceTable */
...
...
@@ -41,13 +32,6 @@
#include <sys/time.h>
#include <netinet/in.h>
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
#include "port.h"
#ifdef WIN32
...
...
@@ -56,55 +40,10 @@
#define _WIN32_WINNT 0x0600
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#define SHUT_RDWR SD_BOTH
#define SHUT_RD SD_RECEIVE
#define SHUT_WR SD_SEND
/* If we have old platform sdk headers, WSAPoll() might not be there */
#ifndef POLLIN
/* Event flag definitions for WSAPoll(). */
#define POLLRDNORM 0x0100
#define POLLRDBAND 0x0200
#define POLLIN (POLLRDNORM | POLLRDBAND)
#define POLLPRI 0x0400
#define POLLWRNORM 0x0010
#define POLLOUT (POLLWRNORM)
#define POLLWRBAND 0x0020
#define POLLERR 0x0001
#define POLLHUP 0x0002
#define POLLNVAL 0x0004
typedef
struct
pollfd
{
SOCKET
fd
;
SHORT
events
;
SHORT
revents
;
}
WSAPOLLFD
,
*
PWSAPOLLFD
,
FAR
*
LPWSAPOLLFD
;
__control_entrypoint
(
DllExport
)
WINSOCK_API_LINKAGE
int
WSAAPI
WSAPoll
(
IN
OUT
LPWSAPOLLFD
fdArray
,
IN
ULONG
fds
,
IN
INT
timeout
);
#endif
#define poll WSAPoll
/*
* Postgres normally uses it's own custom select implementation
* on Windows, but they haven't implemented execeptfds, which
* we use here. So, undef this to use the normal Winsock version
* for now
*/
#undef select
#endif
/*
...
...
@@ -128,15 +67,6 @@ int savedSeqServerFd = -1;
char
*
savedSeqServerHost
=
NULL
;
uint16
savedSeqServerPort
=
0
;
/*
* Outgoing port assignment
*
* To reserve a port number for outgoing connections, we open a dummy
* listening socket. Nobody connects to this socket.
*/
int
portReservationFd
=
-
1
;
int
outgoingPort
=
0
;
/*=========================================================================
* FUNCTIONS PROTOTYPES
*/
...
...
@@ -293,13 +223,9 @@ CleanUpMotionLayerIPC(void)
if
(
UDP_listenerFd
>=
0
)
closesocket
(
UDP_listenerFd
);
if
(
portReservationFd
>=
0
)
closesocket
(
portReservationFd
);
/* be safe and reset global state variables. */
Gp_listener_port
=
0
;
UDP_listenerFd
=
-
1
;
portReservationFd
=
-
1
;
}
/* See ml_ipc.h */
...
...
src/backend/cdb/motion/ic_udpifc.c
浏览文件 @
f6006651
...
...
@@ -2583,7 +2583,7 @@ getSndBuffer(MotionConn *conn)
* RETURNS
* Initialized ChunkTransportState for the Sending Motion Node Id.
*/
ChunkTransportStateEntry
*
static
ChunkTransportStateEntry
*
startOutgoingUDPConnections
(
ChunkTransportState
*
transportStates
,
Slice
*
sendSlice
,
int
*
pOutgoingCount
)
...
...
@@ -3217,12 +3217,12 @@ SetupUDPIFCInterconnect(EState *estate)
static
void
freeDisorderedPackets
(
MotionConn
*
conn
)
{
int
k
=
0
;
int
k
;
if
(
conn
->
pkt_q
==
NULL
)
return
;
for
(;
k
<
Gp_interconnect_queue_depth
;
k
++
)
for
(
k
=
0
;
k
<
Gp_interconnect_queue_depth
;
k
++
)
{
icpkthdr
*
buf
=
(
icpkthdr
*
)
conn
->
pkt_q
[
k
];
if
(
buf
!=
NULL
)
...
...
@@ -3611,7 +3611,6 @@ TeardownUDPIFCInterconnect(ChunkTransportState *transportStates,
static
void
prepareRxConnForRead
(
MotionConn
*
conn
)
{
elog
(
DEBUG3
,
"In prepareRxConnForRead: conn %p, q_head %d q_tail %d q_size %d"
,
conn
,
conn
->
pkt_q_head
,
conn
->
pkt_q_tail
,
conn
->
pkt_q_size
);
Assert
(
conn
->
pkt_q
[
conn
->
pkt_q_head
]
!=
NULL
);
...
...
@@ -6396,7 +6395,7 @@ handleMismatch(icpkthdr *pkt, struct sockaddr_storage *peer, int peer_len)
static
bool
cacheFuturePacket
(
icpkthdr
*
pkt
,
struct
sockaddr_storage
*
peer
,
int
peer_len
)
{
MotionConn
*
conn
=
NULL
;
MotionConn
*
conn
;
conn
=
findConnByHeader
(
&
ic_control_info
.
startupCacheHtab
,
pkt
);
...
...
src/backend/cdb/motion/tupser.c
浏览文件 @
f6006651
...
...
@@ -12,7 +12,6 @@
#include "access/htup.h"
#include "catalog/pg_type.h"
#include "nodes/execnodes.h" //SliceTable
#include "cdb/cdbmotion.h"
#include "cdb/tupser.h"
#include "cdb/cdbvars.h"
...
...
@@ -23,7 +22,6 @@
#include "utils/numeric.h"
#include "utils/memutils.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "access/memtup.h"
...
...
src/include/cdb/cdbinterconnect.h
浏览文件 @
f6006651
...
...
@@ -14,8 +14,6 @@
#include "access/htup.h"
#include "cdb/htupfifo.h"
struct
directTransportBuffer
;
#include "cdb/cdbselect.h"
#include "cdb/tupser.h"
#include "cdb/tupchunk.h"
...
...
@@ -500,5 +498,5 @@ typedef struct ChunkTransportState
extern
void
dumpICBufferList
(
ICBufferList
*
list
,
const
char
*
fname
);
extern
void
dumpUnackQueueRing
(
const
char
*
fname
);
extern
void
dumpConnections
(
ChunkTransportStateEntry
*
pEntry
,
const
char
*
fname
);
#endif
/* CDBINTERCONNECT_H */
#endif
/* CDBINTERCONNECT_H */
src/include/cdb/cdbmotion.h
浏览文件 @
f6006651
...
...
@@ -140,10 +140,4 @@ extern void SendStopMessage(MotionLayerState *mlStates,
*/
extern
void
setExpectedReceivers
(
MotionLayerState
*
mlStates
,
int16
motNodeID
,
int
expectedReceivers
);
/*
* Return a pointer to the internal "end-of-stream" message
*/
extern
TupleChunkListItem
get_eos_tuplechunklist
(
void
);
#endif
/* CDBMOTION_H */
src/include/cdb/cdbvars.h
浏览文件 @
f6006651
...
...
@@ -539,11 +539,6 @@ typedef enum GpVars_Verbosity
GPVARS_VERBOSITY_DEBUG
,
}
GpVars_Verbosity
;
GpVars_Verbosity
gpvars_string_to_verbosity
(
const
char
*
s
);
const
char
*
gpvars_verbosity_to_string
(
GpVars_Verbosity
verbosity
);
/* Enable single-slice single-row inserts. */
extern
bool
gp_enable_fast_sri
;
...
...
src/include/cdb/ml_ipc.h
浏览文件 @
f6006651
...
...
@@ -14,33 +14,12 @@
#include "cdb/cdbvars.h"
#include "cdb/cdbgang.h"
#define IC_SHORT_PACKET_LIMIT (10)
/* MPP-10351: treat some short-packets as drops */
struct
SliceTable
;
/* #include "nodes/execnodes.h" */
struct
EState
;
/* #include "nodes/execnodes.h" */
/* listener filedescriptors */
extern
int
UDP_listenerFd
;
/*
* Registration message
*
* Upon making a connection, the sender sends a registration message to
* identify itself to the receiver. A lot of the fields are just there
* for validity checking.
*/
typedef
struct
RegisterMessage
{
int32
msgBytes
;
int32
recvSliceIndex
;
int32
sendSliceIndex
;
int32
srcContentId
;
int32
srcListenerPort
;
int32
srcPid
;
int32
srcSessionId
;
int32
srcCommandCount
;
}
RegisterMessage
;
/* 2 bytes to store the size of the entire packet. a packet is composed of
* of one or more serialized TupleChunks (each of which has a TupleChunk
* header.
...
...
@@ -101,12 +80,9 @@ extern int GetSeqServerFD(void);
*
*/
extern
void
SetupInterconnect
(
struct
EState
*
estate
);
extern
void
SetupUDPInterconnect
(
struct
EState
*
estate
);
extern
void
SetupUDPIFCInterconnect
(
struct
EState
*
estate
);
extern
void
SetupTCPInterconnect
(
struct
EState
*
estate
);
/* The TeardownInterconnect() function should be called at the end of executing
* a DML statement to close down all
TCP
socket resources that were setup during
* a DML statement to close down all socket resources that were setup during
* SetupInterconnect().
*
* NOTE: it is important that TeardownInterconnect() happens
...
...
@@ -119,20 +95,7 @@ extern void TeardownInterconnect(ChunkTransportState *transportStates,
MotionLayerState
*
mlStates
,
bool
forceEOS
);
extern
void
TeardownTCPInterconnect
(
ChunkTransportState
*
transportStates
,
MotionLayerState
*
mlStates
,
bool
forceEOS
);
extern
void
TeardownUDPInterconnect
(
ChunkTransportState
*
transportStates
,
MotionLayerState
*
mlStates
,
bool
forceEOS
);
extern
void
TeardownUDPIFCInterconnect
(
ChunkTransportState
*
transportStates
,
MotionLayerState
*
mlStates
,
bool
forceEOS
);
extern
void
SetupSequenceServer
(
const
char
*
host
,
int
port
);
extern
void
TeardownSequenceServer
(
void
);
...
...
@@ -226,15 +189,12 @@ extern void DeregisterReadInterest(ChunkTransportState *transportStates,
int
srcRoute
,
const
char
*
reason
);
extern
void
readPacket
(
MotionConn
*
conn
,
bool
inTeardown
);
/*
* Return a UDP receive buffer to our freelist.
*
* allows us to "keep" a buffer held for a connection, to avoid a copy
* (see inplace in chunklist).
*/
extern
void
MlPutRxBuffer
(
ChunkTransportState
*
transportStates
,
int
motNodeID
,
int
route
);
extern
void
MlPutRxBufferIFC
(
ChunkTransportState
*
transportStates
,
int
motNodeID
,
int
route
);
#define getChunkTransportState(transportState, motNodeID, ppEntry) \
...
...
@@ -319,21 +279,17 @@ extern ChunkTransportStateEntry *createChunkTransportState(ChunkTransportState *
extern
ChunkTransportStateEntry
*
removeChunkTransportState
(
ChunkTransportState
*
transportStates
,
int16
motNodeID
);
extern
void
InitMotionTCP
(
int
*
listenerSocketFd
,
uint16
*
listenerPort
);
extern
void
InitMotionUDP
(
int
*
listenerSocketFd
,
uint16
*
listenerPort
);
extern
void
InitMotionUDPIFC
(
int
*
listenerSocketFd
,
uint16
*
listenerPort
);
extern
TupleChunkListItem
RecvTupleChunk
(
MotionConn
*
conn
,
bool
inTeardown
);
extern
void
markUDPConnInactive
(
MotionConn
*
conn
);
extern
void
InitMotionUDPIFC
(
int
*
listenerSocketFd
,
uint16
*
listenerPort
);
extern
void
markUDPConnInactiveIFC
(
MotionConn
*
conn
);
extern
void
CleanupMotionTCP
(
void
);
extern
void
CleanupMotionUDP
(
void
);
extern
void
CleanupMotionUDPIFC
(
void
);
extern
void
WaitInterconnectQuitUDPIFC
(
void
);
extern
void
WaitInterconnectQuitUDP
(
void
);
extern
void
SetupUDPIFCInterconnect
(
struct
EState
*
estate
);
extern
void
TeardownUDPIFCInterconnect
(
ChunkTransportState
*
transportStates
,
MotionLayerState
*
mlStates
,
bool
forceEOS
);
extern
void
adjustMasterRouting
(
Slice
*
recvSlice
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录