-
Notifications
You must be signed in to change notification settings - Fork 1.1k
close writer before soft deletion of search index #2322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/dreyfus/src/clouseau_rpc.erl
Outdated
| rpc(Ref, {delete, couch_util:to_binary(Id)}). | ||
|
|
||
| soft_delete(DbName) -> | ||
| rpc({main, clouseau()}, {soft_delete, DbName}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should look like rpc(Ref, {soft_delete, couch_util:to_binary(Id)}). and be sent to the IndexService process itself (opening it if it's not already open in the usual manner).
|
As this is, by definition, a change to behaviour, it's not a refactor. |
72faf5d to
383606b
Compare
rnewson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I was expecting, thanks. Let's not merge until the clouseau side is approved, in case there are changes needed here.
383606b to
ee49162
Compare
|
should we hold this for 3.0 in light of making search setup easy? |
|
@rnewson Clouseau was approved and merged, per Jan's comment should we progress with this for 3.0? |
|
thanks @wohali and @janl for comments for this PR. Finally, we found that we just need to cloudant-labs/clouseau#27. It means that we don't need the change on dreyfus anymore. Let me close this PR. |
Overview
This fix is to refactor the logic for soft-deletion of search index. In the past, there is case where write.lock was stayed in search index directory and can't be moved. It is due to the fact that the index was not closed gracefully before moving/renaming search index. With this fix, the search index writer can be closed, and then search index can be moved to .deleted directory smoothly.
Testing recommendations
Related Issues or Pull Requests
#2130
cloudant-labs/clouseau#25
Checklist
rel/overlay/etc/default.ini