2017-06-28 4 views
0

Ich habe ein Upgrade von Crate 1.1.4 auf 2.0.2 durchgeführt. Danach habe ich auch alle Tabellen optimiert.CrateIO 2.0.2 - Probleme mit Einfügen und Aktualisieren

Crate läuft auf einem Server mit einer Instanz. Ich habe keine Standardeinstellungen geändert, außer dem Knotennamen und dem Clusternamen.

Aber jetzt kann ich nichts in der Datenbank schreiben. Wählt sind gut, aber jeder Schreibvorgang endet mit:

SQLActionException: INTERNAL_SERVER_ERROR 5000 UnavailableShardsException: [mytable][3] Not enough active copies to meet shard count of [ALL] (have 1, needed 2). Timeout: [1m], request: [ShardUpsertRequest{items=[Item{id='10'}], shardId=[my_table][3]}] 
at org.elasticsearch.action.support.replication.ReplicationOperation.execute(ReplicationOperation.java:107) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.onResponse(TransportReplicationAction.java:319) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.onResponse(TransportReplicationAction.java:254) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$1.onResponse(TransportReplicationAction.java:839) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$1.onResponse(TransportReplicationAction.java:836) 
at org.elasticsearch.index.shard.IndexShardOperationsLock.acquire(IndexShardOperationsLock.java:142) 
at org.elasticsearch.index.shard.IndexShard.acquirePrimaryOperationLock(IndexShard.java:1656) 
at org.elasticsearch.action.support.replication.TransportReplicationAction.acquirePrimaryShardReference(TransportReplicationAction.java:848) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.doRun(TransportReplicationAction.java:271) 
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:250) 
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:242) 
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) 
at org.elasticsearch.transport.TransportService$6.doRun(TransportService.java:550) 
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:527) 
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) 
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) 

Es spielt keine Rolle, ob ich die INSERT/UPDATE-Abfrage mit JDBC tun oder direkt an der Kiste Konsole.

Hat jemand eine gute Idee, wie ich dieses Problem lösen kann?

Danke!

Antwort

0

CrateDB hat die standardmäßigen Schreibkonsistenzprüfungen geändert und auch die Standardeinstellung number_of_shards (um die Verwendung in einem 1-Knoten-Cluster mit Standardtabelleneinstellungen zuzulassen).

Siehe https://crate.io/docs/reference/release_notes/2.0.1.html#breaking-changes

In Ihrem Fall, ich denke, Ihr number_of_replicas-1 gesetzt. Wenn Sie es auf 0 oder 0-1 (automatische Erweiterung) einstellen, wird dies gelöst.

Verwandte Themen