You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/07/13 11:44:38 UTC
[GitHub] janl commented on issue #1434: Views now retain update_seq after
compaction.
janl commented on issue #1434: Views now retain update_seq after compaction.
URL: https://github.com/apache/couchdb/pull/1434#issuecomment-404809633
Repro-script for your convenience.
```shell
#!/bin/sh -x
S=http://a:a@127.0.0.1:15984
P=http://a:a@127.0.0.1:15986
DB=x884
curl -X PUT $S/_node/_local/_config/cluster/q -d '"1"'
# delete test db
curl -X DELETE $S/$DB
# create test d
curl -X PUT $S/$DB
# create ddoc
curl -X PUT $S/$DB/_design%2fddoc -d '{"language":"javascript","views":{"a": {"map": "function(doc) {emit(doc.a)}"}}}'
# create docs
curl -X PUT $S/$DB/doc1 -d '{"a":1}'
curl -X PUT $S/$DB/doc2 -d '{"a":2}'
# query view with seq
curl $S/$DB/_design/ddoc/_view/a?update_seq=true
# compact view
SHARDS=`curl -s http://a:a@127.0.0.1:15986/_all_dbs | jq '.' | grep $DB | sed -e 's/\//%2f/g' | sed -e 's/[\,\"\ ]//g'`
for SHARD in $SHARDS; do
curl -X POST -Hcontent-type:application/json http://a:a@127.0.0.1:15986/$SHARD/_compact/ddoc -d '{}'
done
# query view with seq
curl $S/$DB/_design/ddoc/_view/a?update_seq=true
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services