Open lukepalmer opened 2 months ago
Hi @lukepalmer
I recall getting this error a while back, but cannot remember the exact fix I did on my local.
In moduleLoadCallback() db.cpp, can you try replacing:
initStaticStringObject(keyobj, const_cast<char *>(rgchKey));
with
initStaticStringObject(keyobj, (char *)rgchKey);
Thanks @keithchew! Unfortunately no difference with that change (and I'd have been really curious why if that worked). Let me know if you have other ideas and I'm happy to dig a bit.
Yeah, apologies, it must have been another change or bug. The last time I was testing KeyDB key notifications to modules was here:
https://github.com/Snapchat/KeyDB/issues/708 https://github.com/Snapchat/KeyDB/pull/536
Back then, I made numerous hacks on my local copy and got things running smoothly.
Ah, it might be thing one I was thinking about: https://github.com/Snapchat/KeyDB/issues/742
Just looking at my notes, even though I found the cause and fix in the link above, it appears that I encountered subsequent problems with KeyDB and modules on startup. I ended up not using key_load_itr in the creation of the storage factory, but created a new method in server.cpp to perform key loading notification after everything has been initialised.
Crash report
When using the RedisTimeSeries module, restoring data from flash results in a segmentation fault.
To reproduce:
The wildly large number of bytes attempting to be allocated is both impossible and changes every time, so there's probably garbage getting in there somehow.
Works fine with flash off. Same thing happens on the async branch.
Happy to help debug if you'd have suggestions.
Aditional information