mirror of https://github.com/citusdata/citus.git
Invalidate worker and group ID cache in maintenance daemon
parent
020c21df64
commit
394918f9d0
|
@ -281,7 +281,7 @@ CitusMaintenanceDaemonMain(Datum main_arg)
|
|||
* this causes us to cache a stale pg_dist_node OID. We'd actually expect
|
||||
* all invalidations to arrive after obtaining a lock in LockCitusExtension.
|
||||
*/
|
||||
ClearMetadataOIDCache();
|
||||
InvalidateMetadataSystemCache();
|
||||
|
||||
/*
|
||||
* Perform Work. If a specific task needs to be called sooner than
|
||||
|
|
|
@ -2713,18 +2713,21 @@ InvalidateDistRelationCacheCallback(Datum argument, Oid relationId)
|
|||
*/
|
||||
if (relationId != InvalidOid && relationId == MetadataCache.distPartitionRelationId)
|
||||
{
|
||||
ClearMetadataOIDCache();
|
||||
InvalidateMetadataSystemCache();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ClearMetadataOIDCache resets all the cached OIDs and the extensionLoaded flag.
|
||||
* InvalidateMetadataSystemCache resets all the cached OIDs and the extensionLoaded flag,
|
||||
* and invalidates the worker node and local group ID caches.
|
||||
*/
|
||||
void
|
||||
ClearMetadataOIDCache(void)
|
||||
InvalidateMetadataSystemCache(void)
|
||||
{
|
||||
memset(&MetadataCache, 0, sizeof(MetadataCache));
|
||||
workerNodeHashValid = false;
|
||||
LocalGroupId = -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ extern List * DistTableOidList(void);
|
|||
extern List * ShardPlacementList(uint64 shardId);
|
||||
extern void CitusInvalidateRelcacheByRelid(Oid relationId);
|
||||
extern void CitusInvalidateRelcacheByShardId(int64 shardId);
|
||||
extern void ClearMetadataOIDCache(void);
|
||||
extern void InvalidateMetadataSystemCache(void);
|
||||
|
||||
extern bool CitusHasBeenLoaded(void);
|
||||
extern bool CheckCitusVersion(int elevel);
|
||||
|
|
Loading…
Reference in New Issue