Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,12 @@ private void alterTableProperty(TCredentials c, String tableName, String propert
}
PropUtil.setProperties(manager.getContext(), TablePropKey.of(manager.getContext(), tableId),
Map.of(property, value));
} else {
throw new UnsupportedOperationException("table operation:" + op.name());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the client code is only calling the RPC w/ the two values. However this server side code should not ignore seeing something else. This new throw should cause an error to be logged and TApplicationException on the client side should this ever happen.

}
} catch (IllegalStateException ex) {
log.warn("Invalid table property, tried to set: tableId: " + tableId.canonical() + " to: "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 574 can also return an IllegalStateException

PropUtil.removeProperties(manager.getContext(),
            TablePropKey.of(manager.getContext(), tableId), List.of(property));

This log message should include the table OP instead of assuming it's always a set opt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 5480b83

+ property + "=" + value);
log.warn("Invalid table property, tried to {}: tableId: {} to: {}={}", op.name(),
tableId.canonical(), property, value, ex);
// race condition... table no longer exists? This call will throw an exception if the table
// was deleted:
ClientServiceHandler.checkTableId(manager.getContext(), tableName, op);
Expand Down