[
https://issues.apache.org/jira/browse/COUCHDB-2518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Will Holley updated COUCHDB-2518:
---------------------------------
Description:
CouchDB 1.X supports the conflicts=true query parameter for all API endpints
which accept the include_docs parameter (since version 1.0.3 according to the
release notes). This appears to have regressed in CouchDB 2.0.
I've observed this in the PouchDB tests (which fail for this). Attempting to
reproduce in curl:
$ curl 'http://127.0.0.1:15984/test' -XPUT
{"ok":true}
$ curl 'http://127.0.0.1:15984/test/foo?new_edits=false'
-H'Content-Type:application/json' -XPUT
-d'{"_id":"foo","_rev":"2-aa01552213fafa022e6167113ed01087","value":"bar"}'
{"ok":true,"id":"foo","rev":"2-aa01552213fafa022e6167113ed01087"}
$ curl 'http://127.0.0.1:15984/test/foo?new_edits=false'
-H'Content-Type:application/json' -XPUT
-d'{"_id":"foo","_rev":"3-aa01552213fafa022e6167113ed01087","value":"baz"}'
{"ok":true,"id":"foo","rev":"3-aa01552213fafa022e6167113ed01087"}
$ curl 'http://127.0.0.1:15984/test/foo?conflicts=true' | jq .
{
"_id": "foo",
"_rev": "3-aa01552213fafa022e6167113ed01087",
"value": "baz",
"_conflicts": [
"2-aa01552213fafa022e6167113ed01087"
]
}
$curl 'http://127.0.0.1:15984/test/_changes?include_docs=true&conflicts=true' |
jq .
{
"results": [
{
"seq": [
2,
"g1AAAAGpeJzLYWBg4MhgTmHgz8tPSTV0MDQy1zMAQsMcoARTIkOS_P___7MygKxcoAC7kbGFSZKpOU4NSQpAMskeRU9acopJqrExbj0OID3xKHoMDI0MTM2NcOtJAOmpR9GTCrTIMNkQrscITU8eC5BkaABSQG3zszKYE5nA-kyTzFNNLc0xdcFNMsZq0gKISfsRLkg0M7I0ME0h4IIDEH33sxIZCKh8AFH5H6gyCwCZjmsY"
],
"id": "foo",
"changes": [
{
"rev": "3-aa01552213fafa022e6167113ed01087"
}
],
"doc": {
"_id": "foo",
"_rev": "3-aa01552213fafa022e6167113ed01087",
"value": "baz"
}
}
],
"last_seq": [
2,
"g1AAAAGzeJyFz1EOgjAMBuAFTfTNI-gJzLpRB09yE6VshhDAI-hN9CZ6E73JLJKIGAlZ0jVtvvxpKYSY5xMrFvXROkhAmbXkByUvglTQ0ntf5NxVPJgpHYWEZhDQiitte-aQ2dBpPWySxux6RoKSaNSw2Tfm1DOOgyCDj1E_pp5yFWf-mF0aF7wdknEYdzfpv-7auluXl25ULNGO5N1b9-gcRia0EY24Z-u-7iNMyQEWL83XbI4"
],
"pending": 0
}
was:CouchDB 1.X supports the conflicts=true query parameter for all API
endpints which accept the include_docs parameter (since version 1.0.3 according
to the release notes). This appears to have regressed in CouchDB 2.0.
> CouchDB 2.0 does not support conflicts=true on /_changes
> --------------------------------------------------------
>
> Key: COUCHDB-2518
> URL: https://issues.apache.org/jira/browse/COUCHDB-2518
> Project: CouchDB
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Database Core
> Reporter: Will Holley
>
> CouchDB 1.X supports the conflicts=true query parameter for all API endpints
> which accept the include_docs parameter (since version 1.0.3 according to the
> release notes). This appears to have regressed in CouchDB 2.0.
> I've observed this in the PouchDB tests (which fail for this). Attempting to
> reproduce in curl:
> $ curl 'http://127.0.0.1:15984/test' -XPUT
> {"ok":true}
> $ curl 'http://127.0.0.1:15984/test/foo?new_edits=false'
> -H'Content-Type:application/json' -XPUT
> -d'{"_id":"foo","_rev":"2-aa01552213fafa022e6167113ed01087","value":"bar"}'
> {"ok":true,"id":"foo","rev":"2-aa01552213fafa022e6167113ed01087"}
> $ curl 'http://127.0.0.1:15984/test/foo?new_edits=false'
> -H'Content-Type:application/json' -XPUT
> -d'{"_id":"foo","_rev":"3-aa01552213fafa022e6167113ed01087","value":"baz"}'
> {"ok":true,"id":"foo","rev":"3-aa01552213fafa022e6167113ed01087"}
> $ curl 'http://127.0.0.1:15984/test/foo?conflicts=true' | jq .
> {
> "_id": "foo",
> "_rev": "3-aa01552213fafa022e6167113ed01087",
> "value": "baz",
> "_conflicts": [
> "2-aa01552213fafa022e6167113ed01087"
> ]
> }
> $curl 'http://127.0.0.1:15984/test/_changes?include_docs=true&conflicts=true'
> | jq .
> {
> "results": [
> {
> "seq": [
> 2,
>
> "g1AAAAGpeJzLYWBg4MhgTmHgz8tPSTV0MDQy1zMAQsMcoARTIkOS_P___7MygKxcoAC7kbGFSZKpOU4NSQpAMskeRU9acopJqrExbj0OID3xKHoMDI0MTM2NcOtJAOmpR9GTCrTIMNkQrscITU8eC5BkaABSQG3zszKYE5nA-kyTzFNNLc0xdcFNMsZq0gKISfsRLkg0M7I0ME0h4IIDEH33sxIZCKh8AFH5H6gyCwCZjmsY"
> ],
> "id": "foo",
> "changes": [
> {
> "rev": "3-aa01552213fafa022e6167113ed01087"
> }
> ],
> "doc": {
> "_id": "foo",
> "_rev": "3-aa01552213fafa022e6167113ed01087",
> "value": "baz"
> }
> }
> ],
> "last_seq": [
> 2,
>
> "g1AAAAGzeJyFz1EOgjAMBuAFTfTNI-gJzLpRB09yE6VshhDAI-hN9CZ6E73JLJKIGAlZ0jVtvvxpKYSY5xMrFvXROkhAmbXkByUvglTQ0ntf5NxVPJgpHYWEZhDQiitte-aQ2dBpPWySxux6RoKSaNSw2Tfm1DOOgyCDj1E_pp5yFWf-mF0aF7wdknEYdzfpv-7auluXl25ULNGO5N1b9-gcRia0EY24Z-u-7iNMyQEWL83XbI4"
> ],
> "pending": 0
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)