mirror of https://github.com/citusdata/citus.git
Register cache invalidation callback before version checks
With this commit we start to register InvalidateDistRelationCacheCallback function as cache invalidation callback function before version checks because during version checks we use cache to look up relation ids of some relations like pg_dist_relation or pg_dist_partition_logical_relid_index and we want to know about cache invalidation before accessing them.pull/1492/head
parent
5b300a7aa9
commit
52b056c301
|
@ -511,6 +511,11 @@ LookupDistTableCacheEntry(Oid relationId)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (DistTableCacheHash == NULL)
|
||||
{
|
||||
InitializeDistTableCache();
|
||||
}
|
||||
|
||||
/*
|
||||
* If the version is not known to be compatible, perform thorough check,
|
||||
* unless such checks are disabled.
|
||||
|
@ -538,11 +543,6 @@ LookupDistTableCacheEntry(Oid relationId)
|
|||
}
|
||||
}
|
||||
|
||||
if (DistTableCacheHash == NULL)
|
||||
{
|
||||
InitializeDistTableCache();
|
||||
}
|
||||
|
||||
cacheEntry = hash_search(DistTableCacheHash, hashKey, HASH_ENTER, &foundInCache);
|
||||
|
||||
/* return valid matches */
|
||||
|
|
Loading…
Reference in New Issue