sergey-safarov commented on issue #5934: URL: https://github.com/apache/couchdb/issues/5934#issuecomment-4280676733
I have prepared script `ping_views.sh` with content ```sh #!/bin/sh URL="http://127.0.0.1:5984" USERNAME="admin" PASSWORD="xxxxx" DBNAME="test" jfile="/tmp/output.json" #set -x get_views_obj() { curl -s -u ${USERNAME}:${PASSWORD} "${URL}/${DBNAME}/_all_docs?startkey=%22_design%2F%22&endkey=%22_design0%22&include_docs=true" | jq -c '.rows | map({"doc": .id, "views": (.doc.views | keys)})' } get_request_url_part() { jq -r '.[] | .doc as $d | .views[] | "\($d)/_view/\(.)"' ${jfile} } # collect design document and view names as json object get_views_obj > ${jfile} # format design document and view names as url part request_parts=$(get_request_url_part) # send request to CouchDB server for i in ${request_parts}; do curl -s -u ${USERNAME}:${PASSWORD} "${URL}/${DBNAME}/${i}" done ``` Using this script I have pulled response for every design document and view. After script execution send ```sh curl -X POST -s -u admin:xxxx http://127.0.0.1:5984/test/_view_cleanup ``` And then checked database status. Database have the same size. -- 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]
