Skip to content

Commit 68e0fa8

Browse files
committed
Disable generic metastore cache for Glue with internal caching
1 parent 4f996b8 commit 68e0fa8

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/HiveMetastoreFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121

2222
public interface HiveMetastoreFactory
2323
{
24+
default boolean hasBuiltInCaching()
25+
{
26+
return false;
27+
}
28+
2429
boolean isImpersonationEnabled();
2530

2631
/**

plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/cache/SharedHiveMetastoreCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public boolean isEnabled()
119119

120120
public HiveMetastoreFactory createCachingHiveMetastoreFactory(HiveMetastoreFactory metastoreFactory)
121121
{
122-
if (!enabled) {
122+
if (!enabled || metastoreFactory.hasBuiltInCaching()) {
123123
return metastoreFactory;
124124
}
125125

plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/glue/GlueHiveMetastoreFactory.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ public GlueHiveMetastoreFactory(GlueHiveMetastore metastore, Tracer tracer)
3434
this.metastore = new TracingHiveMetastore(tracer, metastore);
3535
}
3636

37+
@Override
38+
public boolean hasBuiltInCaching()
39+
{
40+
return true;
41+
}
42+
3743
@Override
3844
public boolean isImpersonationEnabled()
3945
{

0 commit comments

Comments
 (0)