@@ -188,20 +188,22 @@ public BaseMetalake loadMetalake(NameIdentifier ident) throws NoSuchMetalakeExce
188
188
return TreeLockUtils .doWithTreeLock (
189
189
ident ,
190
190
LockType .READ ,
191
- () -> {
192
- try {
193
- BaseMetalake baseMetalake = store .get (ident , EntityType .METALAKE , BaseMetalake .class );
194
- baseMetalake = newMetalakeWithResolvedProperties (baseMetalake );
195
- METALAKE_CACHE .put (ident , baseMetalake );
196
- return baseMetalake ;
197
- } catch (NoSuchEntityException e ) {
198
- LOG .warn ("Metalake {} does not exist" , ident , e );
199
- throw new NoSuchMetalakeException (METALAKE_DOES_NOT_EXIST_MSG , ident );
200
- } catch (IOException ioe ) {
201
- LOG .error ("Loading Metalake {} failed due to storage issues" , ident , ioe );
202
- throw new RuntimeException (ioe );
203
- }
204
- });
191
+ () ->
192
+ METALAKE_CACHE .get (
193
+ ident ,
194
+ k -> {
195
+ try {
196
+ BaseMetalake baseMetalake =
197
+ store .get (ident , EntityType .METALAKE , BaseMetalake .class );
198
+ return newMetalakeWithResolvedProperties (baseMetalake );
199
+ } catch (NoSuchEntityException e ) {
200
+ LOG .warn ("Metalake {} does not exist" , ident , e );
201
+ throw new NoSuchMetalakeException (METALAKE_DOES_NOT_EXIST_MSG , ident );
202
+ } catch (IOException ioe ) {
203
+ LOG .error ("Loading Metalake {} failed due to storage issues" , ident , ioe );
204
+ throw new RuntimeException (ioe );
205
+ }
206
+ }));
205
207
}
206
208
207
209
private BaseMetalake newMetalakeWithResolvedProperties (BaseMetalake metalakeEntity ) {
0 commit comments