Rename via ALTER TABLE throws exception on some tables
See original GitHub issueCrateDB version: 2.0.6
JVM version: openjdk version “1.8.0_131” OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
OS version / environment description: Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-47-generic x86_64)
Problem description:
Renaming a table with ALTER TABLE query throws an exception on some tables (maybe related to shard count).
Steps to reproduce:
Table partitioned on 2 columns, 1434 (configured/started) shards, 1.1GB size, 6.3 million records, 0 replicas.
alter table "some_data" rename to "some_data_old";
SQLActionException: INTERNAL_SERVER_ERROR 5000 MultiException in io.crate.executor.transport.ChainableActions$Result.addResultAndError(ChainableActions.java:118)
at io.crate.executor.transport.ChainableActions$Result.addResultAndError(ChainableActions.java:118)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822)
at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:834)
at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2155)
at io.crate.executor.transport.ChainableActions.rollbackOnErrors(ChainableActions.java:90)
at io.crate.executor.transport.ChainableActions.lambda$run$1(ChainableActions.java:59)
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952)
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
at io.crate.action.FutureActionListener.onResponse(FutureActionListener.java:45)
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:91)
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:87)
at org.elasticsearch.action.support.TransportAction$ResponseFilterChain.proceed(TransportAction.java:224)
at org.elasticsearch.action.ingest.IngestActionFilter.apply(IngestActionFilter.java:89)
at org.elasticsearch.action.support.TransportAction$ResponseFilterChain.proceed(TransportAction.java:222)
at org.elasticsearch.action.support.TransportAction$FilteredActionListener.onResponse(TransportAction.java:249)
at org.elasticsearch.action.support.TransportAction$FilteredActionListener.onResponse(TransportAction.java:235)
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onResponse(TransportMasterNodeAction.java:152)
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onResponse(TransportMasterNodeAction.java:149)
at org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction$1.onResponse(TransportOpenIndexAction.java:93)
at org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction$1.onResponse(TransportOpenIndexAction.java:89)
at org.elasticsearch.cluster.AckedClusterStateUpdateTask.onAllNodesAcked(AckedClusterStateUpdateTask.java:64)
at org.elasticsearch.cluster.service.ClusterService$SafeAckedClusterStateTaskListener.onAllNodesAcked(ClusterService.java:874)
at org.elasticsearch.cluster.service.ClusterService.runTasksForExecutor(ClusterService.java:630)
at org.elasticsearch.cluster.service.ClusterService$UpdateTask.run(ClusterService.java:915)
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:458)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:238)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:201)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Use case:
Feature description:
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Syntax error while using multiple rename ... - Stack Overflow
1 Answer 1 ... All the forms of ALTER TABLE that act on a single table, except RENAME, SET SCHEMA, ATTACH PARTITION, and...
Read more >RESOLVED: Issue when renaming Large table stored in S3
I realize that when a table is renamed and is stored on S3, the data is moved from the original tablename to the...
Read more >Cannot rename table after moving the table.ibd to another disk ...
It throws the below error though the table exists in the 'innodb_directories'. It seems to be looking for the table in the 'datadir'...
Read more >How to rename tables in SQL Server with the sp_rename ...
We can find out the table name whose name will change under the Tables path of the SSMS and then click the Rename...
Read more >ALTER TABLE: a SQL statement for altering a database table
Existing tables can be altered with an ALTER TABLE statement. An ALTER TABLE statement is part of DDL, and is for altering a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rps-v @vmishra
OutOfMemory
exception is actually hiding the root cause. We’ll fix that as well (also in 2.1)@mikethebeer We got around the rename/shard count issue by copying the table with a new schema (reduced number of shards) and everything is fine.