dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
24.46k stars 884 forks source link

fix(reply_builder): remove virtual modifier in SendError(ErrorReply) method #3191

Closed BagritsevichStepan closed 1 week ago

BagritsevichStepan commented 1 week ago

fixes #3190

dranikpg commented 1 week ago

I'd suggest something different, let's change this to facade::ErrorReply (we introduced it later, but never changed)

https://github.com/dragonflydb/dragonfly/blob/d20778961079efea40c5601eb060961fdd356b30/src/facade/reply_capture.h#L50-L51

before we move it, we have to make it owned with a custom function or use StringOrView in ErrorReply (it also appeared after, so not all variants were changed)

https://github.com/dragonflydb/dragonfly/blob/d20778961079efea40c5601eb060961fdd356b30/src/core/string_or_view.h#L63-L66

should be a two-liner fix, because now it's a little confusing 🙂 CRB shouldn't have any logic, it should just capture the data