From e885465012ab37899e109881090b8a738dda770a Mon Sep 17 00:00:00 2001 From: wangkang Date: Thu, 7 Sep 2017 20:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8FID=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/itkk/udf/id/IdWorkerFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udf-starter-id/src/main/java/org/itkk/udf/id/IdWorkerFactory.java b/udf-starter-id/src/main/java/org/itkk/udf/id/IdWorkerFactory.java index 979d77e..d413de4 100644 --- a/udf-starter-id/src/main/java/org/itkk/udf/id/IdWorkerFactory.java +++ b/udf-starter-id/src/main/java/org/itkk/udf/id/IdWorkerFactory.java @@ -293,6 +293,7 @@ public class IdWorkerFactory { //远程请求失败,快速剔除远程节点,本地重试 log.error("rmsNexId failure , start fast switching , error ---------> {}", e.getMessage()); redisTemplate.delete(idWorkerWrapper.getCacheKey()); + this.localCache.remove(idWorkerWrapper.getCacheKey()); return this.nextId(idWorkerWrapper.getDatacenterId(), idWorkerWrapper.getWorkerId()); } } @@ -319,6 +320,7 @@ public class IdWorkerFactory { //远程请求失败,快速剔除远程节点,本地重试 log.error("rmsBatchNexId failure , start fast switching , error ---------> {}", e.getMessage()); redisTemplate.delete(idWorkerWrapper.getCacheKey()); + this.localCache.remove(idWorkerWrapper.getCacheKey()); return this.batchNextId(idWorkerWrapper.getDatacenterId(), idWorkerWrapper.getWorkerId(), count); } }