diff --git a/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java b/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java index 8a4f9521..4fba8b32 100644 --- a/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java +++ b/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java @@ -97,15 +97,15 @@ public void loadLuaScript(final RedisCommand redisCommand, int executionCounter) log.debug("RedisStorage script already exists in redis cache: {}", luaScriptType); redisCommand.exec(executionCounterIncr); } else { - log.info("load lua script for script type: {} logutput: {}", luaScriptType, logoutput); + log.info("loading lua script for script type: {} log output: {}", luaScriptType, logoutput); redisAPI.script(Arrays.asList("load",script), stringAsyncResult -> { - String newSha = stringAsyncResult.result().toString(); - log.info("got sha from redis for lua script: {}: {}", luaScriptType, newSha); - if (!newSha.equals(sha)) { + String redisSha = stringAsyncResult.result().toString(); + log.info("got sha from redis for lua script: {}: {}", luaScriptType, redisSha); + if (!redisSha.equals(sha)) { log.warn("the sha calculated by myself: {} doesn't match with the sha from redis: {}. " + - "We use the sha from redis", sha, newSha); + "We use the sha from redis", sha, redisSha); } - sha = newSha; + sha = redisSha; log.info("execute redis command for script type: {} with new sha: {}", luaScriptType, sha); redisCommand.exec(executionCounterIncr); });