From 507f1be93bcba8fbc6101ffb342f1804ab65804f Mon Sep 17 00:00:00 2001 From: wangkang Date: Wed, 27 Dec 2017 15:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ID=E7=94=9F=E6=88=90=E5=99=A8?= =?UTF-8?q?=E7=9A=84bug?= 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, 1 insertion(+), 1 deletion(-) 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 9e466a7..ec681da 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 @@ -369,7 +369,7 @@ public class IdWorkerFactory { //获得缓存数据 CacheValue cacheValue = (CacheValue) redisTemplate.opsForValue().get(key); //比较本地的IP和端口号 - if (cacheValue.getHost().equals(this.host) && cacheValue.getPort() == this.port) { //一致 , 同步本地缓存 + if (cacheValue.getHost().equals(this.host) && cacheValue.getPort() == this.port) { //一致,同步本地缓存 //获得idWorker , 同步本地缓存 idWorker = this.putNxLocalCache(key, datacenterId, workerId); } else { //不一致 , 走远程调用