bells / elasticsearch-analysis-dynamic-synonym

The dynamic synonym plugin adds a synonym token filter that reloads the synonym file(local file or remote file) at given intervals (default 60s).
372 stars 182 forks source link

索引使用该库后,无法restore,望解决 #44

Closed lclangcheng closed 5 years ago

lclangcheng commented 5 years ago

ES: 6.3.0 原索引使用热更新同义词备份后, restore时会出现异常。

[node-3] failing shard [failed shard, shard [log_201903][0], node[64Wmq1ukRoWUxFK8eRbnpQ], [P], recovery_source[snapshot recovery from backup:2019031403/7wMm5SKzTzmsyabhynrY0g], s[INITIALIZING], a[id=2UWaSbMfTTCq0Fl2gvWU7g], unassigned_info[[reason=NEW_INDEX_RESTORED], at[2019-03-14T09:16:50.061Z], delayed=false, details[restore_source[backup/2019031403]], allocation_status[fetching_shard_data]], message [failed to create index], failure [NullPointerException[null]], markAsStale [true]] java.lang.NullPointerException: null at com.bellszhu.elasticsearch.plugin.synonym.analysis.RemoteSynonymFile.isNeedReloadSynonymMap(RemoteSynonymFile.java:193) ~[?:?] at com.bellszhu.elasticsearch.plugin.synonym.analysis.RemoteSynonymFile.(RemoteSynonymFile.java:69) ~[?:?] at com.bellszhu.elasticsearch.plugin.synonym.analysis.DynamicSynonymTokenFilterFactory.(DynamicSynonymTokenFilterFactory.java:98) ~[?:?] at com.bellszhu.elasticsearch.plugin.DynamicSynonymPlugin$1.get(DynamicSynonymPlugin.java:69) ~[?:?] at com.bellszhu.elasticsearch.plugin.DynamicSynonymPlugin$1.get(DynamicSynonymPlugin.java:64) ~[?:?] at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:344) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.index.analysis.AnalysisRegistry.buildTokenFilterFactories(AnalysisRegistry.java:172) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:156) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.index.IndexService.(IndexService.java:162) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:367) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:453) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:407) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:144) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndices(IndicesClusterStateService.java:452) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:228) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.cluster.service.ClusterApplierService.lambda$callClusterStateAppliers$6(ClusterApplierService.java:496) ~[elasticsearch-6.3.0.jar:6.3.0] at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_201] at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:493) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:480) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:431) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:161) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:625) [elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:244) [elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:207) [elasticsearch-6.3.0.jar:6.3.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]