Snapchat / KeyDB

A Multithreaded Fork of Redis
https://keydb.dev
BSD 3-Clause "New" or "Revised" License
11.02k stars 564 forks source link

Update t_stream.cpp #806

Open msdiakov opened 3 months ago

msdiakov commented 3 months ago

fix ms-* stream id

JohnSully commented 3 months ago

Do you have an example case where the original code fails? Or if this is porting from Redis the commit that changed it is sufficient.

barbiefan commented 3 months ago

I guess it's this upstream commit: https://github.com/redis/redis/commit/21aa1d4b9118bd42d254c7f9e6157c44d8b1a61d

keithchew commented 3 months ago

I believe that upstream change is to make the XADD more robust when an explicit ID is supplied (I am using the auto-generated ID and have not encountered any issues in KeyDB). If you are going to pull those changes, then it is probably a good idea to pull all the other changes as well, not just that snippet.

JohnSully commented 3 months ago

Yes it looks like we're missing the tests too