We are using createdb-prometheus-adapter
write data to CrateDB 5.6.2
, while the shards of table partition are in underreplicated state. For details please see the below figure. We couldn’t find related solutions in community, any suggestion would be appreciated, thanks in advance.
The crate-infra.log shows.
[2024-02-28T10:03:07,265][WARN ][o.e.c.r.a.AllocationService] [t-cratedb-s-004] tionAction$AsyncReplicaAction.lambda$onResponse$0(TransportReplicationAction.java:561)
at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:99)
at org.elasticsearch.action.support.replication.TransportWriteAction$WriteReplicaResult$1.onSuccess(TransportWriteAction.java:207)
at org.elasticsearch.action.support.replication.TransportWriteAction$AsyncAfterWriteAction.maybeFinish(TransportWriteAction.java:289)
at org.elasticsearch.action.support.replication.TransportWriteAction$AsyncAfterWriteAction.run(TransportWriteAction.java:303)
at org.elasticsearch.action.support.replication.TransportWriteAction$WriteReplicaResult.runPostReplicaActions(TransportWriteAction.java:214)
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncReplicaAction.onResponse(TransportReplicationAction.java:558)
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncReplicaAction.onResponse(TransportReplicationAction.java:536)
at org.elasticsearch.index.shard.IndexShard.lambda$innerAcquireReplicaOperationPermit$27(IndexShard.java:2925)
at org.elasticsearch.action.ActionListener$3.onResponse(ActionListener.java:127)
at org.elasticsearch.index.shard.IndexShardOperationPermits.acquire(IndexShardOperationPermits.java:292)
at org.elasticsearch.index.shard.IndexShardOperationPermits.acquire(IndexShardOperationPermits.java:242)
at org.elasticsearch.index.shard.IndexShard.lambda$acquireReplicaOperationPermit$25(IndexShard.java:2860)
at org.elasticsearch.index.shard.IndexShard.innerAcquireReplicaOperationPermit(IndexShard.java:2964)
at org.elasticsearch.index.shard.IndexShard.acquireReplicaOperationPermit(IndexShard.java:2859)
at org.elasticsearch.action.support.replication.TransportReplicationAction.acquireReplicaOperationPermit(TransportReplicationAction.java:881)
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncReplicaAction.doRun(TransportReplicationAction.java:629)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at org.elasticsearch.action.support.replication.TransportReplicationAction.handleReplicaRequest(TransportReplicationAction.java:521)
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:59)
at org.elasticsearch.transport.InboundHandler$RequestHandler.doRun(InboundHandler.java:331)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.lang.Thread.run(Thread.java:1583)
Caused by: [.partitioned.metrics.04732dpg74o3ee1k60o30c1g/OKwmMNp7T1uLjDcGj1wDag][[.partitioned.metrics.04732dpg74o3ee1k60o30c1g][3]] org.elasticsearch.index.translog.TranslogException: Failed to write operation [Index{id='Aw0xNzA5MDg1Mjg2MzMxEGI0ZWJkYWMxNzFkZTlkYjUNMTcwOTA3ODQwMDAwMA==', seqNo=-2, primaryTerm=0, version=-3, autoGeneratedIdTimestamp=-1}]
at org.elasticsearch.index.translog.Translog.add(Translog.java:526)
at org.elasticsearch.index.engine.InternalEngine.index(InternalEngine.java:941)
at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:806)
at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:778)
at io.crate.execution.dml.upsert.TransportShardUpsertAction.processRequestItemsOnReplica(TransportShardUpsertAction.java:448)
at io.crate.execution.dml.upsert.TransportShardUpsertAction.processRequestItemsOnReplica(TransportShardUpsertAction.java:94)
at io.crate.execution.dml.TransportShardAction$2.call(TransportShardAction.java:119)
at io.crate.execution.dml.TransportShardAction$2.call(TransportShardAction.java:116)
at io.crate.execution.dml.TransportShardAction.wrapOperationInKillable(TransportShardAction.java:130)
at io.crate.execution.dml.TransportShardAction.shardOperationOnReplica(TransportShardAction.java:122)
at io.crate.execution.dml.TransportShardAction.shardOperationOnReplica(TransportShardAction.java:53)
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncReplicaAction.onResponse(TransportReplicationAction.java:557)
... 18 more
Caused by: java.lang.IllegalArgumentException: sequence number must be assigned
at org.elasticsearch.index.seqno.SequenceNumbers.min(SequenceNumbers.java:90)
at org.elasticsearch.index.translog.TranslogWriter.add(TranslogWriter.java:210)
at org.elasticsearch.index.translog.Translog.add(Translog.java:519)
... 29 more
], allocation_status[no_attempt]], expected_shard_size[314811200]], markAsStale [true], failure [org.elasticsearch.transport.RemoteTransportException: [t-cratedb-s-005][10.10.22.215:4300][internal:crate:sql/data/write[r]]
Caused by: org.apache.lucene.store.AlreadyClosedException: [.partitioned.metrics.04732dpg74o3ee1k60o30c1g][3] engine is closed