Strange issue with Redis cache gets, Lucee redis e...
# lucee
s
Strange issue with Redis cache gets, Lucee redis extension 3.0.0.48: https://github.com/lucee/extension-redis/issues/13
z
I think the === might be wrong, that's comparing same exact object in memory, rather than are they equal (something we wanna change in 6.0)
d
yeah that's the issue, they are literally the same object in memory. same
System.identityHashCode
, etc (but, only sometimes, depends on who wins the race)
z
I'm guessing it might be related to the nearCacheEntry / local cache in the provider so to move forward, we need a jira ticket and can we move this discussion to the mailing list, slack is a black hole and all this info is worth preserving
s
You bet, will write it up tomorrow
z
cool, I'm knocking up a test using the example code
https://github.com/lucee/extension-redis/pull/14 (dunno why github actions isn't running for this PR)
image.png
from my local run
[java]    [script]         testAdditional.RedisRace ---------------------
[java]    [script] poolsize 24, no sleep
[java]    [script] poolsize 1, no sleep
[java]    [script] [true,true,false,false,false,false,false,false,false,false,false]
[java]    [script] poolsize 24, sleep(1)
[java]    [script] [false,false,false,false,false,false,false,false,false,false,false]
[java]    [script] poolsize 1, sleep(1)
[java]    [script] [false,false,false,false,false,false,false,false,false,false,false]
[java]    [script]          (2 tests passed in 488 ms)
[java]    [script] ERRORED
[java]    [script]
[java]    [script]         Suites/Specs: 1/4
[java]    [script]
[java]    [script]         Failures: 1
[java]    [script]         Errors:   1
[java]    [script]         Pass:     2
[java]    [script]         Skipped:  0
[java]    [script]
[java]    [script]
[java]    [script] test for race Redis Cache, pool size = 24, no sleep
[java]    [script]
[java]    [script]         Errored: variable [X] doesn't exist
[java]    [script]
[java]    [script]         C:\work\lucee-extensions\extension-redis\tests\RedisRace.cfc:87
[java]    [script]         C:\work\lucee-extensions\extension-redis\tests\RedisRace.cfc:102
[java]    [script]         C:\work\lucee6\test\_testRunner.cfc:273
[java]    [script]         C:\work\lucee6\test\run-tests.cfm:234
[java]    [script]         /bootstrap-tests.cfm:108
[java]    [script]
[java]    [script]
[java]    [script]         expression
[java]    [script]
[java]    [script]         lucee.runtime.exp.ExpressionException: variable [X] doesn't exist
[java]    [script]         at lucee.runtime.type.scope.UndefinedImpl.get(UndefinedImpl.java:243)