Skip to content

[Improvement] Remove unnecessary metalake access in CatalogManager #9562

@yuqi1129

Description

@yuqi1129

What would you like to be improved?

The following code will access and check Metalake twice, as the method catalogInUse will check metalake again.

checkMetalake(metalakeIdent, store);
try {
if (catalogInUse(store, ident)) {
return null;
}

private boolean catalogInUse(EntityStore store, NameIdentifier ident)
throws NoSuchMetalakeException, NoSuchCatalogException {
NameIdentifier metalakeIdent = NameIdentifier.of(ident.namespace().levels());
return metalakeInUse(store, metalakeIdent) && getCatalogInUseValue(store, ident);

How should we improve?

No response

Metadata

Metadata

Assignees

Labels

improvementImprovements on everything

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions