未验证 提交 269c3b73 编写于 作者: D dh-cloud 提交者: GitHub

Fix: might recycle wrong gang size.

In buildGangDefinition, newGangDefinition->db_descriptors are
initialized one by one, but newGangDefinition->size was already
set to its final value. If an error was caught, its size should
be reset to the right number.
上级 e39465ae
......@@ -230,7 +230,7 @@ buildGangDefinition(List *segments, SegmentType segmentType)
{
Gang *newGangDefinition = NULL;
ListCell *lc;
int i = 0;
volatile int i = 0;
int size;
int contentId;
......@@ -260,6 +260,7 @@ buildGangDefinition(List *segments, SegmentType segmentType)
}
PG_CATCH();
{
newGangDefinition->size = i;
RecycleGang(newGangDefinition, true /* destroy */);
PG_RE_THROW();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册