[
https://issues.apache.org/jira/browse/PHOENIX-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15480374#comment-15480374
]
James Taylor commented on PHOENIX-3162:
---------------------------------------
This looks fine, [~rajeshbabu]. One question, though, why do we need to catch a
ClassNotFoundException here?
{code}
+
+ private void dropIndex(ObserverContext<RegionCoprocessorEnvironment>
c) {
+ try {
+ Connection connection =
+
QueryUtil.getConnection(c.getEnvironment().getConfiguration());
+ connection.createStatement().execute(
+ "DROP INDEX " + INDEX_NAME + "_2" + " ON "
+ +
c.getEnvironment().getRegion().getTableDesc().getNameAsString());
+ connection.commit();
+ } catch (ClassNotFoundException e) {
+ } catch (SQLException e) {
+ }
+ }
{code}
> TableNotFoundException might be thrown when an index dropped while upserting.
> -----------------------------------------------------------------------------
>
> Key: PHOENIX-3162
> URL: https://issues.apache.org/jira/browse/PHOENIX-3162
> Project: Phoenix
> Issue Type: Bug
> Reporter: Rajeshbabu Chintaguntla
> Assignee: Rajeshbabu Chintaguntla
> Fix For: 4.8.1
>
> Attachments: PHOENIX-3162.patch
>
>
> If a table has mix of global and local indexes and one of them is dropped
> while upserting data then there is a chance that the query might fail with
> TableNotFoundException. Usually when an index dropped we skip writing to the
> dropped index on failure.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)