Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

68276 new purge api#67

Open
jiangphcn wants to merge 5 commits intoapache:masterfrom
cloudant:68276_new_purge_api
Open

68276 new purge api#67
jiangphcn wants to merge 5 commits intoapache:masterfrom
cloudant:68276_new_purge_api

Conversation

@jiangphcn
Copy link

No description provided.

davisp and others added 4 commits August 3, 2016 13:13
Add test for view after purge requests

BugzID: 68276
couch_db:purge_docs now accepts a list of IdRevs
this changes in the tests calls this new API

BugzID: 68276
@davisp
Copy link
Member

davisp commented Feb 27, 2017

LGTM though we can't merge this until after PSE stuff lands of course.

I just have a few minor style tweaks to note but otherwise this looks pretty good all around.

Copy link
Member

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good PR over all, just a few minor tweaks all related to style.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should take the last four or five lines and move them to a couch_mrview_util function called get_signature_from_filename or something similar. We should also probably assert that the signature is something close to expected, ie > 16 characters with only hexadecimal characters or something.

false
end.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've got two extra blank lines here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a blank line before utc_string/0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use <<"mrview">> instead of just <<"view">>.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use purge-mrview instead of purge-view

@jiangphcn
Copy link
Author

Thanks, Paul. I already addressed all comments above in commit 4a1d645. Please help check when you get time. Regarding utc_string(), we plan to ask Mayya to create one in couchdb-couch and refer to new one in other places.

Copy link
Member

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor nits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after = operator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is longer than 80 characters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing spaces around - operator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should call this ddoc_id here since that'll be more consistent with other parts of the code base. For other indexers that don't treat the whole ddoc as a single index is where there's an added indexname.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change that to ... "verifying existince of ~s/~s :: ~p ~p", [ShardDbName, DDocId, {E, T}, Stack]

 - implementation of updating local purge document
 - provide verify_index_exists/1 to check whether
   index exists or not
 - clean up local purge document in cleanup cycle
 - add new test case and refine existing test cases
 - create local purge document if it doesn’t exist
   when couch_mrview_index:open/2 is called
 - directly use db to clean up local purge document
 - use couch_db:purge_docs/2 with UUID
 - add error handling for verify_index_exists/1
 - add check for Sig in couch_mrview_cleanup:run/1
 - construct get_signature_from_filename/1
 - use utc_string/0 provided by couch_util.erl
 - use ddoc_cache:open/2 to open design document
 - extend test from couch_db to fabric

Bugzid: 68276
@jiangphcn jiangphcn force-pushed the 68276_new_purge_api branch from 2f3b67f to f916079 Compare March 14, 2017 15:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments