Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryshao committed Sep 21, 2023
1 parent c37aca9 commit c050c00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,21 +518,19 @@ private <R extends HasIdentifier> R operateOnEntity(
String opName,
long id,
boolean shouldFail) {
R ret;
R ret = null;
try {
ret = fn.apply(ident);
} catch (NoSuchEntityException e) {
// Case 2: The table is created by Graviton, but has no corresponding entity in Graviton.
LOG.error(FormattedErrorMessages.ENTITY_NOT_FOUND, ident);
ret = null;
} catch (Exception e) {
// Case 3: The table is created by Graviton, but failed to operate the corresponding entity
// in Graviton.
if (shouldFail) {
throw new RuntimeException(e);
} else {
LOG.error(FormattedErrorMessages.STORE_OP_FAILURE, opName, ident, e);
ret = null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public EntityType type() {
return EntityType.SCHEMA;
}

// Ignore field namespace and comment
// Ignore field namespace
@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public boolean equals(Object o) {
return false;
}

// Ignore field namespace
TableEntity baseTable = (TableEntity) o;
return Objects.equal(id, baseTable.id)
&& Objects.equal(name, baseTable.name)
Expand Down

0 comments on commit c050c00

Please sign in to comment.