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 2020/03/04 14:09:14 UTC

[GitHub] [couchdb] janl opened a new issue #2634: Expose Purge Infos to Clients

janl opened a new issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634
 
 
   ## Summary
   
   CouchDB keeps a list of purge infos to ensure that purges can be applied on a cluster without purged documents being re-introduced by internal replication.
   
   It would be useful to make this list available for replication clients like PouchDB, who then could apply local purges on their own. I know PouchDB doesn’t implement purge just yet, but it’s something that folks will need before long.
   
   ## Desired Behaviour
   
   ```
   GET /db/_purge_infos[?limit=X&offset=Y]
   {
     "purge_infos": [
       {...purge info...},
       ...
     ]
   }
   ```
   
   ## Possible Solution
   
   Expose the internal purge_infos API to chttpd.
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] palash25 commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
palash25 commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-596322215
 
 
   thanks for the help @jiangphcn will take a look at it in a few days.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] wohali commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-603989865
 
 
   Hey @palash25 , if you have access to Docker, here's a development environment for you:
   
   ```
   docker pull couchdbdev/debian-buster-erlang-20.3.8.25-1:latest
   docker run -it couchdbdev/debian-buster-erlang-20.3.8.25-1:latest /bin/bash
   ```
   
   Once inside the container:
   
   ```
   cd
   ```
   
   will get you to the jenkins user home directory. You can now checkout CouchDB and develop from there.
   
   Hope this helps!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] janl commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
janl commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-603749208
 
 
   Heya @palash25 how’s it going, anything we can help with? :)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] palash25 commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
palash25 commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-604808305
 
 
   I am on Ubuntu18.04 @wohali , I ran that script but I still keep getting the jsapi.h error, nevermind I will go with the docker setup

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] palash25 commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
palash25 commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-596190700
 
 
   Hi @janl I am learning Erlang and wanted to take a shot at this. Just to be sure we need to use the `load_purge_infos/2` function to get the purge info right?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] jiangphcn commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
jiangphcn commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-594986761
 
 
   any other contributor is welcome to start with this. If not, I can do this. Just one information, we didn't keep all historical purge_infos and there is limit for purged-info https://docs.couchdb.org/en/stable/api/database/misc.html#db-purged-infos-limit. If the stored purged info exceeds limit and all related parties (such as internal replication, mrview, search index, etc) purged their own stuff, the purged info itself will be deleted permanently.  So the returned purge_info might not be complete.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] jiangphcn commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
jiangphcn commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-596286734
 
 
   thanks @palash25 You can get purge info from this and underlying API `couch_db:fold_purge_infos`, and just pay attention to return aggregation of purge infos from all shard db because request was distributed here https://github.com/apache/couchdb/blob/master/src/fabric/src/fabric_doc_purge.erl#L40

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] wohali commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-604586120
 
 
   @palash25 No, #445 is closed. Do not reopen that.
   
   Which operating system are you using? If Linux, which distribution? If it's one of the following:
   * Debian stretch/buster
   * Ubuntu 16/18
   * RedHat 6/7/8
   * CentOS 6/7/8
   * macOS
   * FreeBSD
   
   you can use the script here to install all the dependencies you need in your base operating system:
   
   https://github.com/apache/couchdb-ci/blob/master/bin/install-dependencies.sh
   
   You'll need to clone the entire repository, then run that script. That should get you running.
   
   If it's not one of those, you may be forced to compile SpiderMonkey from scratch, which is *not* fun.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] palash25 commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
palash25 commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-603755479
 
 
   Hi @janl haven't had the time to take a crack at this the past week, give me till the end of this week if it isn't urgent.
   
   I was also having some problem with the dev setup so need to fix that first.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] palash25 commented on issue #2634: Expose Purge Infos to Clients

Posted by GitBox <gi...@apache.org>.
palash25 commented on issue #2634: Expose Purge Infos to Clients
URL: https://github.com/apache/couchdb/issues/2634#issuecomment-604561687
 
 
   Hi @wohali thanks for this also I actually found this issue thread yesterday which describes the exact problem I am facing with the build now. https://github.com/apache/couchdb/issues/455
   
   I don't prefer to develop using docker, I tried the steps you listed in that issue but wasn't able to build couchdb from source still got the same jsapi.h error. Should I move the conversation to #445 ?
   
   I would only like to develop using docker as a last resort.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services