void cachePartition(Partition part, SharedCache sharedCache) {
      try {
        tableLock.writeLock().lock();
        PartitionWrapper wrapper = makePartitionWrapper(part, sharedCache);
        partitionCache.put(CacheUtils.buildPartitionCacheKey(part.getValues()), wrapper);
        int size = getObjectSize(PartitionWrapper.class, wrapper);
        updateMemberSize(MemberName.PARTITION_CACHE, size, SizeMode.Delta);
        setMemberCacheUpdated(MemberName.PARTITION_CACHE, true);

        // Invalidate cached aggregate stats
        if (!aggrColStatsCache.isEmpty()) {
          aggrColStatsCache.clear();
          updateMemberSize(MemberName.AGGR_COL_STATS_CACHE, 0, SizeMode.Snapshot);
        }
      } finally {
        tableLock.writeLock().unlock();
      }
    }
this flag is used to validate/invalidate cached constraints snapshot.
All table constraints are update successfully either via updater thread or
while create_table_with_constraint api then it is set to true else
false and redirect all the call to raw metastore.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java