keithchew
keithchew
Hi @tylerhutcherson I have a similar issue where the search results are non deterministic when there is a tie on the results. However, my case is somewhat different from yours....
Looking at the code in module.c, I can see that redisearch is actually doing what I wanted: ``` // in case of a tie - compare ids if (!cmp) {...
It looks like there is another workaround using ft.aggregate: ``` FT.AGGREGATE myIndex "*" sortby 4 @testCount desc @idField asc ``` Although we cannot limit the results to only return 1...
hi @rmd4 I have been testing keydb, and have experienced similar crashes. Adding more logging, I noticed when keydb is not properly shutdown, it loses the TTLs in they flash...
hi @rmd4 It looks like KeyDB has some issues with the m_numexpires field when flash is enabled. My temporary solution is to patch it and rebuild m_numexpires on startup. At...
After looking into this a bit more, the m_numexpires was introduced in: https://github.com/Snapchat/KeyDB/pull/720 @msotheeswaran-sc it looks like this was pushed in v6.3.4 to fix the OOM issues by evicting items...
hi @rmd4 As per my previous comment, I tracked it down to the eviction changes for flash introduced in v6.3.4. My temporary workaround for this is to set m_numexpires on...
Hi @splitice In db.cpp, you can update m_numexpires when KeyDB iterates the keys on startup, eg: ``` size_t offset = 0; std::unique_ptr spexpire = deserializeExpire((const char*)data, cbData, &offset); if (spexpire...
Hi @splitice On my local testing copy, I have created a new method that is only called on startup, to prevent the multiple flows. The snippet above is what I...
Hi @splitice Sorry I don't have a patch as yet, as I am just copying and pasting snippets here and there as quick fixes to prevent crashes, as my current...