You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, cachelib could persist cache by call shutdown api. But if the process is killed by 'kill -9', then no signal could be catch by the process so that could not call shutdown api.
Does cachelib have an persistence API and the application could call it periodically? And could load the cache even if the process is killed by 'kill -9'? The cache is not up to date is accepted.
The text was updated successfully, but these errors were encountered:
Unlike storage engines, cachelib does not offer crash consistent storage of items. for caches, this is not a deal breaker since durability is not a prime concern for the cache. Besides, caches operate with background evictions, so the application already expects the cache to be empty or missing items. In steady state, cachelib has DRAM data structures that need to be persisted for recovery on restart. If a cache process is receiving a kill -9, we can not guarantee the state of these DRAM data structures to be consistent for shutdown. So I would not recommend catching the kill signal and doing a shutdown unless you can guarantee that the application threads have stopped accessing the cache and shutdown api can be safely called.
There is an internal experimental feature, but it is not the "kill -9" feature you are probably looking for. With that you can snapshot the cache by shutting it down (after ensuring application thread stop accessing cache) and copying the state to another machine to bootstrap another cache from it.
Currently, cachelib could persist cache by call shutdown api. But if the process is killed by 'kill -9', then no signal could be catch by the process so that could not call shutdown api.
Does cachelib have an persistence API and the application could call it periodically? And could load the cache even if the process is killed by 'kill -9'? The cache is not up to date is accepted.
The text was updated successfully, but these errors were encountered: