NOTE: This is a public repository. Images or logs containing protected health information (PHI) must be fully-redacted.
Describe the Bug
When doing server side purging, purgelog docs are not saved in medic-sentinel after every purge. It only creates medic-purged-roles-<roles-hash> purge dbs. Also, we expect user docs to reduce based on the configured purge rules but no change
How To Reproduce The Issue
List steps for someone trying to reproduce the behavior. For example:
create a purge.js file with the purge rules
Save, compile app settings and upload app settings to the server
Expected Behavior purgelog docs are saved in medic-sentinel after every purge.
user docs to reduce based on the configured purge rules but no change
how can I get these from medic-os;
“* Can you please share Sentinel’s memory usage and maximum allowed memory?”
“* Can you please share how many documents Sentinel has left to process?”
[2021-09-24 06:37:46] 2021-09-24 06:37:46 [31mERROR [39m: Error while running Server Side Purge: { FetchError: Could not create Buffer from response body for http://haproxy:5984/medic/_design/medic/_view/docs_by_replication_key?include_docs=true: “size” argument must not be larger than 2147483647
[2021-09-24 06:37:46] at PassThrough. (/srv/software/medic-sentinel/md5-jkODRqiwM6Wpv4ECz2eM9Q==/node_modules/node-fetch/lib/index.js:425:12)
get the SEQ Sentinel is currently on by getting the metadata document. This document contains a property processed_seq which you will use in the next steps
{ FetchError: Could not create Buffer from response body for http://haproxy:5984/medic/_design/medic/_view/docs_by_replication_key?include_docs=true: “size” argument must not be larger than 2147483647
[2021-09-24 06:37:46] at PassThrough. (/srv/software/medic-sentinel/md5-jkODRqiwM6Wpv4ECz2eM9Q==/node_modules/node-fetch/lib/index.js:425:12)
@sheila_abby
We’ve been working on a fix for the purging issue which I believe you’re seeing.
The fix is not yet released, but I have tested it on the data set we originally saw it on.
Because the bug only affects some instances, depending on the existent data, it would be very helpful for us if you would test it on a clone (please don’t directly test in production) with your data set.
To test, please install the 3.7-dynamic-purge-batches branch on your clone.