solr 6.2.0使用replacenode命令来迁移实例,replacenode命令的流程
/admin/collections?action=REPLACENODE&source=xxx&&target=yyy
1.在yyy实例上创建xxx上存在的core
2.将数据迁移到yyy上的新core
3.删除xxx上的core
遇到的问题:
如果xxx实例上的core数量多于10,那么在第3阶段删除源实例上的core时,大概率会触发线程池满的错误:
Task org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$$Lambda$11/1711392234@354e1668 rejected from org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor@43a30e4b[Running, pool size = 10, active threads = 10, queued tasks = 0, completed tasks = 0]</str>
经过多次测试,迁移实例的阶段是OK的,错误出现在delete replica时:
2020-06-10 18:46:43,221 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Create and syny new replica on target node successfully | org.apache.solr.cloud.ReplaceNodeCmd.call(ReplaceNodeCmd.java:155)
2020-06-10 18:46:43,221 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_19 shard=shard4 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,222 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_19 shard=shard6 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,222 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_18 shard=shard5 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,223 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_18 shard=shard8 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,223 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_13 shard=shard1 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,226 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_13 shard=shard10 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,229 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_12 shard=shard3 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,230 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_12 shard=shard8 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,231 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_11 shard=shard2 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,231 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_11 shard=shard8 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,232 | INFO | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Deleting replica for collection=Collection_10 shard=shard3 on node=8.5.238.9:21104_solr | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:65)
2020-06-10 18:46:43,233 | WARN | OverseerThreadFactory-7-thread-5-processing-n:8.5.244.8:21104_solr | Error deleting | org.apache.solr.cloud.DeleteNodeCmd.cleanupReplicas(DeleteNodeCmd.java:81)
java.util.concurrent.RejectedExecutionException: Task org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$$Lambda$11/49000282@7f409b58 rejected from org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor@3ac36edc[Running, pool size = 10, active threads = 10, queued tasks = 0, completed tasks = 70]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecuto