stefanwille / crystal-redis

Full featured Redis client for Crystal
MIT License
381 stars 61 forks source link

concurrency issue with -Dpreview_mt #132

Closed pbrumm closed 1 year ago

pbrumm commented 1 year ago

really the fix is within the pool lib but just wanted to give some visibility.

if using -Dpreview_mt and high concurrency around redis checkin and checkout for the pooled connection. There are chances of hitting some mem crashes and inconsistencies around array access

also objects like arrays and hashes that are accessed outside of mutex will sometimes move in mem to resize and that can mess things up as well.

this change fixed my inconsistencies and crashes around multi threading.

you shouldn't merge directly as I switch the shard deps which will mess up peoples builds.

I am going to submit into the pool repo as well.

kostya commented 1 year ago

fixed in 2.9.0