I have traced through the code in syncDelete, and it looks like this scenario happens when m_numexpires is 0 and ensure() in db.cpp cannot find the record from flash (ie where stat_storage_provider_read_misses is incremented). In this condition, ensure() will not increment m_numexpires from 0 and the crash happens.
Not sure the best way to work around this, perhaps syncDelete should not assert m_numexpires > 0 if there is a read miss from flash?
Apologies, I was actually testing the async_flash branch, and it looks like it is missing a ++m_numexpires there. Have patched my local and error is no longer happening.
Hi
Testing on v6.3.4 and encountered this stack trace:
I have traced through the code in syncDelete, and it looks like this scenario happens when m_numexpires is 0 and ensure() in db.cpp cannot find the record from flash (ie where stat_storage_provider_read_misses is incremented). In this condition, ensure() will not increment m_numexpires from 0 and the crash happens.
Not sure the best way to work around this, perhaps syncDelete should not assert m_numexpires > 0 if there is a read miss from flash?