Skip to content

Commit

Permalink
loadSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
xunliu committed Jan 2, 2025
1 parent 3850237 commit 5481807
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ public Schema createSchema(NameIdentifier ident, String comment, Map<String, Str
@Override
public Schema loadSchema(NameIdentifier ident) throws NoSuchSchemaException {
// Load the schema and check if this schema is already imported.
EntityCombinedSchema schema = internalLoadSchema(ident);
// TreeLockUtils.doWithTreeLock(ident, LockType.READ, () -> internalLoadSchema(ident));
EntityCombinedSchema schema = TreeLockUtils.doWithTreeLock(ident, LockType.READ, () -> internalLoadSchema(ident));

if (!schema.imported()) {
TreeLockUtils.doWithTreeLock(
Expand Down Expand Up @@ -278,7 +277,7 @@ public Schema alterSchema(NameIdentifier ident, SchemaChange... changes)
public boolean dropSchema(NameIdentifier ident, boolean cascade) throws NonEmptySchemaException {
NameIdentifier catalogIdent = getCatalogIdentifier(ident);
return TreeLockUtils.doWithTreeLock(
ident,
catalogIdent,
LockType.WRITE,
() -> {
boolean droppedFromCatalog =
Expand Down

0 comments on commit 5481807

Please sign in to comment.