[jira] [Commented] (COUCHDB-3266) changes feed not invoked when deleting a document using a selector filtered feed.

2017-01-04 Thread Steven Spungin (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15799245#comment-15799245
 ] 

Steven Spungin commented on COUCHDB-3266:
-

> f you keep all original fields then the deleted doc takes up as much space as 
> before. Do as Nick suggests and keep only the fields that you need for your 
> filter.

That means every time I change the filter, I have to find all workaround calls 
to delete and change them.  Not very maintainable.

Anyway, in my case I am monitoring other code that is already calling the 
delete method, so I won't be able to alter it.

I do think that the filter callback should be called in my case, however.  I 
have not looked at the source code, but at the very least, when a document is 
deleted, a workaround is to look at the last revision and if it matches the 
filter then simply notify the listener with the deleted rev.  This seems 
reasonable and appropriate behavior for the selector filter.

> changes feed not invoked when deleting a document using a selector filtered 
> feed.
> -
>
> Key: COUCHDB-3266
> URL: https://issues.apache.org/jira/browse/COUCHDB-3266
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Reporter: Steven Spungin
>
> When I subscribe to the _changes endpoint with a selector filter, I get 
> updated and created changes, but not deleted changes.
> But when I subscribe without a selector, I get all the changes as expected.
> Here is my posted selector:
>  {"selector": {"type": "message", "subtype": "email"}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] couchdb-chttpd pull request #153: allow w parameter for attachments

2017-01-04 Thread lazedo
GitHub user lazedo opened a pull request:

https://github.com/apache/couchdb-chttpd/pull/153

allow w parameter for attachments



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lazedo/couchdb-chttpd patch-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/couchdb-chttpd/pull/153.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #153


commit 90648a2e0bb4718cdd701f537f3de47dedb9b2c2
Author: lazedo 
Date:   2017-01-04T18:45:31Z

allow w parameter for attachments




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (COUCHDB-3266) changes feed not invoked when deleting a document using a selector filtered feed.

2017-01-04 Thread Robert Newson (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15798706#comment-15798706
 ] 

Robert Newson commented on COUCHDB-3266:


if you keep _all_ original fields then the deleted doc takes up as much space 
as before. Do as Nick suggests and keep only the fields that you need for your 
filter.

> changes feed not invoked when deleting a document using a selector filtered 
> feed.
> -
>
> Key: COUCHDB-3266
> URL: https://issues.apache.org/jira/browse/COUCHDB-3266
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Reporter: Steven Spungin
>
> When I subscribe to the _changes endpoint with a selector filter, I get 
> updated and created changes, but not deleted changes.
> But when I subscribe without a selector, I get all the changes as expected.
> Here is my posted selector:
>  {"selector": {"type": "message", "subtype": "email"}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (COUCHDB-3266) changes feed not invoked when deleting a document using a selector filtered feed.

2017-01-04 Thread Nick Vatamaniuc (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-3266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15798696#comment-15798696
 ] 

Nick Vatamaniuc commented on COUCHDB-3266:
--

Thanks for checking out the new selector feature!

Deleting a document via the DELETE method is an equivalent operation PUT-ing 
{"_deleted":true} document a a new revision.

It seems to achieve the desired effect, it is also possible to delete a 
document and keep all the original fields by just adding a "_deleted:true field 
and PUT-ing that. For example {"type":"message", "subtype":"email", ..., 
"_deleted":true} then the document will pass the filter.

> changes feed not invoked when deleting a document using a selector filtered 
> feed.
> -
>
> Key: COUCHDB-3266
> URL: https://issues.apache.org/jira/browse/COUCHDB-3266
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Reporter: Steven Spungin
>
> When I subscribe to the _changes endpoint with a selector filter, I get 
> updated and created changes, but not deleted changes.
> But when I subscribe without a selector, I get all the changes as expected.
> Here is my posted selector:
>  {"selector": {"type": "message", "subtype": "email"}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (COUCHDB-3259) Don't trap exits in couch_file

2017-01-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15798303#comment-15798303
 ] 

ASF GitHub Bot commented on COUCHDB-3259:
-

Github user asfgit closed the pull request at:

https://github.com/apache/couchdb-couch/pull/219


> Don't trap exits in couch_file
> --
>
> Key: COUCHDB-3259
> URL: https://issues.apache.org/jira/browse/COUCHDB-3259
> Project: CouchDB
>  Issue Type: Bug
>Reporter: Robert Newson
> Fix For: 2.1.0
>
>
> It turns out to be impossible to trap the exit message from the parent
> process, which is the only reason couch_file traps exits in the first
> place (i.e, this has never worked).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (COUCHDB-3259) Don't trap exits in couch_file

2017-01-04 Thread Robert Newson (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Newson resolved COUCHDB-3259.

   Resolution: Fixed
Fix Version/s: 2.1.0

> Don't trap exits in couch_file
> --
>
> Key: COUCHDB-3259
> URL: https://issues.apache.org/jira/browse/COUCHDB-3259
> Project: CouchDB
>  Issue Type: Bug
>Reporter: Robert Newson
> Fix For: 2.1.0
>
>
> It turns out to be impossible to trap the exit message from the parent
> process, which is the only reason couch_file traps exits in the first
> place (i.e, this has never worked).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (COUCHDB-3259) Don't trap exits in couch_file

2017-01-04 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15798302#comment-15798302
 ] 

ASF subversion and git services commented on COUCHDB-3259:
--

Commit bbc32e160562fc2f6233b6f583cdef28ced8ed9f in couchdb-couch's branch 
refs/heads/master from [~rnewson]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=bbc32e1 ]

Don't trap exits in couch_file

It turns out to be impossible to trap the exit message from the parent
process in a gen_server, which is the only reason couch_file traps
exits in the first place (i.e, this has never worked).

This commit also changes the hot upgrade code to handle this
transition (but not the previous one).

COUCHDB-3259


> Don't trap exits in couch_file
> --
>
> Key: COUCHDB-3259
> URL: https://issues.apache.org/jira/browse/COUCHDB-3259
> Project: CouchDB
>  Issue Type: Bug
>Reporter: Robert Newson
>
> It turns out to be impossible to trap the exit message from the parent
> process, which is the only reason couch_file traps exits in the first
> place (i.e, this has never worked).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (COUCHDB-3264) POST to _all_docs does not respect conflicts=true

2017-01-04 Thread Will Holley (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-3264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Will Holley resolved COUCHDB-3264.
--
   Resolution: Fixed
Fix Version/s: 2.1.0

> POST to _all_docs does not respect conflicts=true
> -
>
> Key: COUCHDB-3264
> URL: https://issues.apache.org/jira/browse/COUCHDB-3264
> Project: CouchDB
>  Issue Type: Bug
>  Components: Database Core
>Affects Versions: 2.0.1
>Reporter: Will Holley
> Fix For: 2.1.0
>
>
> In CouchDB 2.0, POST to _all_docs with ids specified in the keys field does 
> not respect the conflicts=true parameter.
> In CouchDB 1.6.1:
> {code}
> $ curl -X PUT http://127.0.0.1:5984/test
> {"ok":true}
> $ curl -X POST http://127.0.0.1:5984/test/_bulk_docs -H 
> 'Content-type:application/json' -d '{ "docs":[{"_id":"foo","_rev": 
> "1-a1"},{"_id":"foo","_rev": "1-a2"}], "new_edits":false}'
> []
> $ curl -X GET 
> 'http://127.0.0.1:5984/test/_all_docs?include_docs=true=true'
> {"total_rows":1,"offset":0,"rows":[
> {"id":"foo","key":"foo","value":{"rev":"1-a2"},"doc":{"_id":"foo","_rev":"1-a2","_conflicts":["1-a1"]}}
> ]}
> $ curl -X POST 
> 'http://127.0.0.1:5984/test/_all_docs?include_docs=true=true' -H 
> 'Content-type:application/json' -d '{"keys":["foo"]}'
> {"total_rows":1,"offset":0,"rows":[
> {"id":"foo","key":"foo","value":{"rev":"1-a2"},"doc":{"_id":"foo","_rev":"1-a2","_conflicts":["1-a1"]}}
> ]}
> {code}
> In CouchDB 2.0:
> {code}
> $ curl -X PUT http://127.0.0.1:15984/test
> {"ok":true}
> $ curl -X POST http://127.0.0.1:15984/test/_bulk_docs -H 
> 'Content-type:application/json' -d '{ "docs":[{"_id":"foo","_rev": 
> "1-a1"},{"_id":"foo","_rev": "1-a2"}], "new_edits":false}'
> []
> $ curl -X GET 
> 'http://127.0.0.1:15984/test/_all_docs?include_docs=true=true'
> {"total_rows":1,"offset":0,"rows":[
> {"id":"foo","key":"foo","value":{"rev":"1-a2"},"doc":{"_id":"foo","_rev":"1-a2","_conflicts":["1-a1"]}}
> ]}
> $ curl -X POST 
> 'http://127.0.0.1:15984/test/_all_docs?include_docs=true=true' -H 
> 'Content-type:application/json' -d '{"keys":["foo"]}'
> {"total_rows":1,"rows":[
> {"id":"foo","key":"foo","value":{"rev":"1-a2"},"doc":{"_id":"foo","_rev":"1-a2"}}
> ]}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)