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/03/01 10:05:24 UTC

[GitHub] jiangphcn opened a new pull request #1187: [WIP] Couchdb 3326 clustered purge

jiangphcn opened a new pull request #1187: [WIP] Couchdb 3326 clustered purge
URL: https://github.com/apache/couchdb/pull/1187
 
 
   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   
   The primary purpose of clustered purge is to clean databases that have multiple deleted tombstones or single documents that contain large numbers of conflicts. But it can also be used to purge any document (deleted or non-deleted) with any number of revisions.
   
   Clustered Purge was designed to maintain eventual consistency and prevent unnecessary invalidation of secondary indexes. For this, every database keeps track of a certain number of historical purges requested in the database, as well as its current ``purge_seq``. Internal replications and secondary indexes process database's purges and periodically update their corresponding purge checkpoint documents to report ``purge_seq`` processed by them. To ensure eventual consistency, the database will remove store historical purges only after they have been processed by internal replication jobs and secondary indexes.
   
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provides any behaviour that the end users
        could notice? -->
   ```
   make check apps=couch tests=couch_bt_engine_test_
   make check apps=couch tests=couch_db_purge_docs_test_
   make check apps=couch_mrview tests=view_purge_test_
   make check apps=couch_mrview tests=view_purge_fabric_test_
   make check apps=fabric
   make check apps=chttpd tests=purge_test_
   ```
   
   ## JIRA issue number
   https://issues.apache.org/jira/browse/COUCHDB-3326
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  -->
   
   https://github.com/apache/couchdb/pull/1186
   
   ## Checklist
   
   - [X] Code is written and works correctly;
   - [X] Changes are covered by tests;
   - [X] Documentation reflects the changes;
   

----------------------------------------------------------------
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