Skip to content

Commit

Permalink
Merge pull request #547 from SDCISA-13736-ApplyFindings-20240108-0954
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenalpha authored Jan 10, 2024
2 parents 51b5486 + 534cb50 commit 31e8e01
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 31e8e01

Please sign in to comment.