未验证 提交 bff12f77 编写于 作者: Z Zhenghua Lyu 提交者: GitHub

Fix some potential bugs that not update size results.

At several places we just invoke the function add_size
but does not assign its return value to any variable.
The result is just discarded. This commit fixes this.
上级 b85760a0
......@@ -423,8 +423,8 @@ InitLocks(void)
/* Allow for extra entries if resource locking is enabled. */
if (Gp_role == GP_ROLE_DISPATCH && IsResQueueEnabled())
{
add_size(max_table_size, NRESLOCKENTS() );
//add_size(max_plock_table_size, NRESPROCLOCKENTS() );
max_table_size = add_size(max_table_size, NRESLOCKENTS() );
max_table_size = add_size(max_table_size, NRESPROCLOCKENTS() );
}
init_table_size = max_table_size / 2;
......@@ -3817,14 +3817,14 @@ LockShmemSize(void)
if (Gp_role == GP_ROLE_DISPATCH && IsResQueueEnabled())
{
add_size(max_table_size, NRESLOCKENTS() );
max_table_size = add_size(max_table_size, NRESLOCKENTS() );
}
size = add_size(size, hash_estimate_size(max_table_size, sizeof(LOCK)));
if (Gp_role == GP_ROLE_DISPATCH && IsResQueueEnabled())
{
add_size(max_table_size, NRESPROCLOCKENTS() );
max_table_size = add_size(max_table_size, NRESPROCLOCKENTS() );
}
/* proclock hash table */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册