nickva commented on PR #5625:
URL: https://github.com/apache/couchdb/pull/5625#issuecomment-3202005847
Update the PR with these changes:
* As a safety precaution add a `is_process_alive(Fd)` check after we fetch
the item from the cache. Behind the scenes that still sends a signal to the
process so it will add some overhead but it seems safer. If the process is
already dead, the cache returns `undefined` as if the item is missing and then
cleans any other entries associated with that `Fd`. The caller will then try to
fetch the term from `couch_file` and crash like it would without the cache.
* Parameterized the percentage of max size below which entries are left
around in the cache. That is if the cache is mostly empty then some entries
with 0 bump_counts are left around in there in case they may be needed again.
The tradeoff here is that if a bunch of new work come suddenly it may find the
cache full until the next cleanup cycles removes all the 0 entries. This will
let us test some of the scenarios mentioned like what happens if most entries
are already in the cache.
* Added a 3rd `[couchdb, bt_engine_cache, full]` metric which is bumped
when tried to insert into the cache but it was full.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]