tkhurana commented on code in PR #2018:
URL: https://github.com/apache/phoenix/pull/2018#discussion_r1817232457
##########
phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java:
##########
@@ -2249,7 +2249,9 @@ private boolean ensureViewIndexTableDropped(byte[]
physicalTableName, long times
final ReadOnlyProps props = this.getProps();
final boolean dropMetadata =
props.getBoolean(DROP_METADATA_ATTRIB, DEFAULT_DROP_METADATA);
if (dropMetadata) {
- admin.disableTable(physicalIndexTableName);
+ if (admin.isTableEnabled(physicalIndexTableName)) {
+ admin.disableTable(physicalIndexTableName);
Review Comment:
I was thinking we could have a disableTable function in the
ConnectionQueryServicesImpl class which could internally handle this exception.
Something like `disableTable(Admin, Tablename)`. I did a quick check there are
5 places in this file where we are doing disableTable. We could call this
function everywhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]