mirror of https://github.com/citusdata/citus.git
Merge pull request #6105 from citusdata/marcocitus/fix-process-exit
Fixes a crash that can happen due to catalog read in shmem_exitpull/6097/head^2
commit
ccc3b1bacf
|
@ -420,7 +420,7 @@ IncrementSharedConnectionCounter(const char *hostname, int port)
|
|||
{
|
||||
SharedConnStatsHashKey connKey;
|
||||
|
||||
if (GetMaxSharedPoolSize() == DISABLE_CONNECTION_THROTTLING)
|
||||
if (MaxSharedPoolSize == DISABLE_CONNECTION_THROTTLING)
|
||||
{
|
||||
/* connection throttling disabled */
|
||||
return;
|
||||
|
@ -484,7 +484,11 @@ DecrementSharedConnectionCounter(const char *hostname, int port)
|
|||
{
|
||||
SharedConnStatsHashKey connKey;
|
||||
|
||||
if (GetMaxSharedPoolSize() == DISABLE_CONNECTION_THROTTLING)
|
||||
/*
|
||||
* Do not call GetMaxSharedPoolSize() here, since it may read from
|
||||
* the catalog and we may be in the process exit handler.
|
||||
*/
|
||||
if (MaxSharedPoolSize == DISABLE_CONNECTION_THROTTLING)
|
||||
{
|
||||
/* connection throttling disabled */
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue