-
-
Notifications
You must be signed in to change notification settings - Fork 457
Description
Hi,
We've updated from 0.8.0 to 1.1.1 and found many issues, unfortunately on our Production >.<
CacheManager.Core
CacheManager.StackExchange.Redis
"# Server
redis_version:3.0.7
redis_build_id:f7cfd70bacad9a98
redis_mode:cluster
os:Linux 3.10.0-327.13.1.el7.x86_64 x86_64
gcc_version:4.8.5
1/ There are suddenly a lot of errors: Update failed on ':' because of too many retries. There are many old key created by previous version but when running with the version 1.1.1, the problem seems to start to occur and the old key staying there undeleted/unexpired.
More info
The hashvalue of the key (probably created by the old version)
The code that read the key probably check the expiration mode incorrectly, please confirm
When comparing the version, it's getting obvious that my theory is correct 😠
usesDefaultExpiration is true in this case however, the expirationMode was sliding as created by the old version. I think the cacheItem creation should use the existing expirationMode unless it's "None" and usesDefaultExpiration == true.
// Current code
var cacheItem =
usesDefaultExpiration ?
string.IsNullOrWhiteSpace(region) ?
new CacheItem<TCacheValue>(key, value) :
new CacheItem<TCacheValue>(key, region, value) :
string.IsNullOrWhiteSpace(region) ?
new CacheItem<TCacheValue>(key, value, expirationMode, expirationTimeout) :
new CacheItem<TCacheValue>(key, region, value, expirationMode, expirationTimeout);Finally, i saw the code EvictFromOtherHandles if the version is conflicted but for some reasons the key is not deleted from the other Handle.
2/ OutOfMemoryException thrown From BackplaneMessage.ReadBytes
I tried to debug but I'm not really familiar with the code so it might be better for the author to have a look.
Rollback to 0.8.0 and the problem gone.
Thanks




