solr replacenode命令

在Solr 6.2.0中使用replacenode命令迁移实例时,遇到线程池满和超时问题。当源实例core数量超过10时,删除源实例core阶段会出现线程池满错误。通过调整socket超时时间和增大线程池大小解决了部分问题。然而,在核心数达到2000+时,仍出现`java.lang.OutOfMemoryError: unable to create new native thread`和删除操作失败的情况。经过排查,发现是客户端构建SolrCloudClient时未指定socket超时导致的,通过设置合理的超时时间解决了Read timed out错误。然而,删除操作的并发执行导致源节点HTTP连接池满,仍有优化空间。
摘要由CSDN通过智能技术生成

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值