Skip to content

Removing SDS from hiredis. #866

@michael-grunder

Description

@michael-grunder

We recently bumped the hiredis bundled with Redis to support PUSH messages and ran into quite a few roadblocks over our slightly divergent copies of the SDS library.

Being both projects are written in pure C there aren't a lot of good solutions to the problem. We're really left with either (a) enforcing identical versions of SDS, or (b) renaming all of Hiredis' symbols so they don't conflict in Redis.

Neither of these options is particularly good.

The thing is, Hiredis doesn't use the SDS library extensively, and in fact, it's somewhat inefficient as we rely on sdsrange (which does a memmove) when progressing through the buffer. We are likely better served using a more appropriate data structure (e.g. a ring buffer).

@yossigo Let me know what you think. I'm going to see if I can put together a proof of concept. The trickiest part is probably going to be making sure it works in both Linux and Windows.

Related #656 #184

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions