Alex Volkov created IGNITE-10660: ------------------------------------ Summary: Can't drop index created for dynamic cache Key: IGNITE-10660 URL: https://issues.apache.org/jira/browse/IGNITE-10660 Project: Ignite Issue Type: Bug Components: sql Affects Versions: 2.7 Reporter: Alex Volkov
Here are steps to reproduce: # Start cluster with persistence. # Start cache with configuration (transactional, replicated full_sync with query entity). # Connect to cluster using sqlline. # Create index on this cache. # Try to drop index created on step 4. Expecting result: Index dropped. Actual result: Got error: {code:java} [avolkov@lab37 bin]$ ./sqlline.sh --color=true --verbose=true --showWarnings=true --showNestedErrs=true --outputFormat=csv -u jdbc:ignite:thin://lab37:10800 Setting property: [showWarnings, true] Setting property: [showNestedErrs, true] Setting property: [outputFormat, csv] issuing: !connect jdbc:ignite:thin://lab37:10800 '' '' org.apache.ignite.IgniteJdbcThinDriver Connecting to jdbc:ignite:thin://lab37:10800 Connected to: Apache Ignite (version 2.7.1#20181210-sha1:a39dbf0f) Driver: Apache Ignite Thin JDBC Driver (version 2.7.1#20181210-sha1:a39dbf0f) Autocommit status: true Transaction isolation: TRANSACTION_REPEATABLE_READ sqlline version 1.3.0 0: jdbc:ignite:thin://lab37:10800> !tables 'TABLE_CAT','TABLE_SCHEM','TABLE_NAME','TABLE_TYPE','REMARKS','TYPE_CAT','TYPE_SCHEM','TYPE_NAME','SELF_REFERENCING_COL_NAME','REF_GENERATION' '','cache_group_1_015','ALLTYPESINDEXED','TABLE','','','','','','' '','cache_group_1_001','ALLTYPESINDEXED','TABLE','','','','','','' '','cache1','ALLTYPESINDEXED','TABLE','','','','','','' 0: jdbc:ignite:thin://lab37:10800> select * from "cache1".ALLTYPESINDEXED; 'STRCOL','LONGCOL' No rows selected (0.576 seconds) 0: jdbc:ignite:thin://lab37:10800> create index test_idx_1 on "cache1".ALLTYPESINDEXED(STRCOL); No rows affected (0.05 seconds) 0: jdbc:ignite:thin://lab37:10800> drop index test_idx_1; Error: Index doesn't exist: TEST_IDX_1 (state=42000,code=3006) java.sql.SQLException: Index doesn't exist: TEST_IDX_1 at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750) at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212) at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475) at sqlline.Commands.execute(Commands.java:823) at sqlline.Commands.sql(Commands.java:733) at sqlline.SqlLine.dispatch(SqlLine.java:795) at sqlline.SqlLine.begin(SqlLine.java:668) at sqlline.SqlLine.start(SqlLine.java:373) at sqlline.SqlLine.main(SqlLine.java:265) 0: jdbc:ignite:thin://lab37:10800> !index 'TABLE_CAT','TABLE_SCHEM','TABLE_NAME','NON_UNIQUE','INDEX_QUALIFIER','INDEX_NAME','TYPE','ORDINAL_POSITION','COLUMN_NAME','ASC_OR_DESC','CARDINALITY','PAGES','FILTER_CONDITION' '','cache_group_1_001','ALLTYPESINDEXED','true','','ALLTYPESINDEXED_LONGCOL_IDX','3','0','LONGCOL','A','0','0','' '','cache1','ALLTYPESINDEXED','true','','ALLTYPESINDEXED_STRCOL_ASC_IDX','3','0','STRCOL','A','0','0','' '','cache1','ALLTYPESINDEXED','true','','TEST_IDX_1','3','0','STRCOL','A','0','0','' '','cache_group_1_015','ALLTYPESINDEXED','true','','ALLTYPESINDEXED_LONGCOL_IDX','3','0','LONGCOL','A','0','0','' {code} In node log I see the exception: {code:java} [16:01:15,412][SEVERE][client-connector-#179][JdbcRequestHandler] Failed to execute SQL query [reqId=0, req=JdbcQueryExecuteRequest [schemaName=PUBLIC, pageSize=1024, maxRows=0, sqlQry=drop index test_idx_1, args=[], stmtType=ANY_STATEMENT_TYPE, autoCommit=true]] class org.apache.ignite.internal.processors.query.IgniteSQLException: Index doesn't exist: TEST_IDX_1 at org.apache.ignite.internal.processors.query.h2.ddl.DdlStatementsProcessor.convert(DdlStatementsProcessor.java:644) at org.apache.ignite.internal.processors.query.h2.ddl.DdlStatementsProcessor.runDdlStatement(DdlStatementsProcessor.java:244) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFieldsNative(IgniteH2Indexing.java:1977) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:2141) at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2135) at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2130) at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2707) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2144) at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:511) at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:245) at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:208) at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:162) at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:45) at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279) at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109) at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) at org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)