Created
February 19, 2025 18:06
-
-
Save nickva/3517dd19215950b57448b22c0ed32fe6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ./dev/run --admin=adm:pass -n1 | |
# "http" is httpie (https://httpie.io) | |
DB=http://adm:[email protected]:15984 | |
http -q delete $DB/db | |
http -q put $DB/db | |
http -b $DB/db/_purged_infos | |
# { | |
# "purged_infos": [] | |
# } | |
for DOC in {1..3000}; do | |
echo "doc ${DOC}" | |
REV=$(http put $DB/db/${DOC} a=b | jq -r '.rev') | |
http -q post $DB/db/_purge ${DOC}:="[\"${REV}\"]" | |
done | |
# [error] 2025-02-19T18:04:57.333061Z [email protected] <0.18552.4> 187d99d1d9 rpc couch_db:fold_purge_infos/4 {invalid_start_purge_seq,0} [{couch_bt_engine,fold_purge_infos,5,[{file,"src/couch_bt_engine.erl"},{line,611}]},{fabric_rpc,with_db,3,[{file,"src/fabric_rpc.erl"},{line,360}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,141}]}] | |
# [error] 2025-02-19T18:04:57.333172Z [email protected] <0.18553.4> 187d99d1d9 rpc couch_db:fold_purge_infos/4 {invalid_start_purge_seq,0} [{couch_bt_engine,fold_purge_infos,5,[{file,"src/couch_bt_engine.erl"},{line,611}]},{fabric_rpc,with_db,3,[{file,"src/fabric_rpc.erl"},{line,360}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,141}]}] | |
http -b $DB/db/_purged_infos | |
# { | |
# "purged_infos": [ | |
# { | |
# "id": "doc1", | |
# "revs": [ | |
# "1-4b8a35d3f70a5962f86c6dd06ceb599c" | |
# ] | |
# }, | |
# { | |
# "id": "doc2", | |
# "revs": [ | |
# "1-43ca4ac5f035a3057752750224f3c1d1" | |
# ] | |
# } | |
# ] | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment