Skip to content

[BUG] [Remote Store] AssertionError while creating an index with index.remote_store.enabled=true #4233

@sachinpkale

Description

@sachinpkale

Describe the bug
Creating an index with index.remote_store.enabled=true setting is throwing following exception for test clusters:

WARNING: Uncaught exception in thread: Thread[opensearch[node_t1][clusterApplierService#updateTask][T#1],5,TGRP-SegmentReplicationWithNoOpIT]
java.lang.AssertionError: should not be called by a cluster state applier. reason [the applied cluster state is not yet available]
	at __randomizedtesting.SeedInfo.seed([653126D7780829FE]:0)
	at org.opensearch.cluster.service.ClusterApplierService.assertNotCalledFromClusterStateApplier(ClusterApplierService.java:427)
	at org.opensearch.cluster.service.ClusterApplierService.state(ClusterApplierService.java:211)
	at org.opensearch.cluster.service.ClusterService.state(ClusterService.java:170)
	at org.opensearch.index.IndexService.createShard(IndexService.java:513)
	at org.opensearch.indices.IndicesService.createShard(IndicesService.java:867)
	at org.opensearch.indices.IndicesService.createShard(IndicesService.java:201)
	at org.opensearch.indices.cluster.IndicesClusterStateService.createShard(IndicesClusterStateService.java:646)
	at org.opensearch.indices.cluster.IndicesClusterStateService.createOrUpdateShards(IndicesClusterStateService.java:623)
	at org.opensearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:280)
	at org.opensearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:606)
	at org.opensearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:593)
	at org.opensearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:561)
	at org.opensearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:484)
	at org.opensearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:186)
	at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:747)
	at org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedOpenSearchThreadPoolExecutor.java:282)
	at org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedOpenSearchThreadPoolExecutor.java:245)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions