Skip to content

Commit

Permalink
[SHARD] make assert less strict to ensure local node is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
s1monw committed Mar 12, 2015
1 parent 55f2a54 commit 8b4f6e0
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -222,7 +222,7 @@ public IndexShard(ShardId shardId, @IndexSettings Settings indexSettings, IndexS
this.codecService = codecService;
this.shardSuggestService = shardSuggestService;
this.shardBitsetFilterCache = shardBitsetFilterCache;
assert clusterService.lifecycleState() == Lifecycle.State.STARTED : "expected lifecycle to be started but was: " + clusterService.lifecycleState() ; // otherwise localNode is still none;
assert clusterService.localNode() != null : "Local node is null lifecycle state is: " + clusterService.lifecycleState();
this.localNode = clusterService.localNode();
state = IndexShardState.CREATED;
this.refreshInterval = indexSettings.getAsTime(INDEX_REFRESH_INTERVAL, EngineConfig.DEFAULT_REFRESH_INTERVAL);
Expand Down

0 comments on commit 8b4f6e0

Please sign in to comment.