hiredis icon indicating copy to clipboard operation
hiredis copied to clipboard

Hiredis: Advanced async-handling

Open oshamash opened this issue 2 years ago • 2 comments

  • hiredis.c: Convert redisSetError to take format and va_args
  • dict.* : Fixed generic hash function -> cannot really take signed number
  • async.* : Valdup function now handles OOM properly KeyCompare function uses proper sized integers nextArgument - change to use proper str-int conversion function Added redisAsyncAppend* function family to support buffer optimizations in async-mode Added proper error handling on OOM errors [inc buffer rollback]

Review fixes

  • hiredis.c : Reverted back to memcpy(), will test *printf in different time
  • aysnc.c : Minor changes for better readability

Handle unlikely/pathological OOM conditon cleanly.

More OOM checks

oshamash avatar Sep 29 '21 08:09 oshamash

@michael-grunder I took #822 (from #638) and decided to match to upstream, I think it's about time community will have access to ASYNC optimizations using the native hiredis client 😄

oshamash avatar Sep 29 '21 08:09 oshamash

I'm going to merge this but first I need to make sure that the change to dictGenHashFunction doesn't somehow cause pain in upstream Redis.

I think it's OK but we've had this kind of symbol conflict before (it's why all the sds symbols in hiredis are prefixed with hi_).

michael-grunder avatar Oct 01 '21 19:10 michael-grunder