-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add RemoveDocument API #484
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krapie
force-pushed
the
remove-document
branch
4 times, most recently
from
March 8, 2023 05:33
d537884
to
d8f30ca
Compare
Codecov Report
@@ Coverage Diff @@
## main #484 +/- ##
==========================================
+ Coverage 47.78% 48.79% +1.00%
==========================================
Files 69 69
Lines 5826 5962 +136
==========================================
+ Hits 2784 2909 +125
+ Misses 2733 2712 -21
- Partials 309 341 +32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
krapie
force-pushed
the
remove-document
branch
4 times, most recently
from
March 9, 2023 09:12
fda566d
to
048d3f6
Compare
hackerwins
force-pushed
the
remove-document
branch
from
March 9, 2023 12:32
ecd844c
to
2fc95f0
Compare
hackerwins
commented
Mar 9, 2023
hackerwins
commented
Mar 9, 2023
hackerwins
commented
Mar 9, 2023
hackerwins
force-pushed
the
remove-document
branch
5 times, most recently
from
March 10, 2023 02:00
4cb509b
to
53906c6
Compare
hackerwins
force-pushed
the
remove-document
branch
from
March 10, 2023 04:41
53906c6
to
4990582
Compare
After implementing document deletion, multiple IDs can be mapped to the same document key. Therefore, this commit change to use of the document ID for APIs except attach API.
hackerwins
force-pushed
the
remove-document
branch
from
March 10, 2023 04:59
4990582
to
82f8c92
Compare
hackerwins
commented
Mar 13, 2023
hackerwins
force-pushed
the
remove-document
branch
from
March 13, 2023 11:12
06267f7
to
540f841
Compare
This was referenced Mar 15, 2023
This was referenced Mar 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Add document deletion API.
Document deletion is crucial feature to save resources. Without deletion, accumulated documents and its relevant data will waste storage resources.
The overall document deletion process will look like this:
RemoveDocument
) withDocIsRemoved = true
in requestChangePack
PushPull
ofRemoveDocument
(or other APIs), checkDocIsRemoved
. And ifDocIsRemoved = true
, simply setRemovedAt
date indocInfo
to logically(soft) remove document.ChangePack
'sDocIsRemoved
totrue
to inform document deletion.DocumentRemoveDuration
), document is physically removed from database.To successfully implement this API, we need to seperate our tasks and implement them step by step.
RemovedAt
date indocInfo
ListDocuments
API used by Dashboard and CLI(Admin)is_removed = true
) and its relevant data.Which issue(s) this PR fixes:
Address #464
Special notes for your reviewer:
Discussion about document deletion API in codepair: https://codepair.yorkie.dev/ylvpas
Previous closed PR for implementing document deletion API: #468
WatchDocuments API also needs to find documents by
ID
, not bykey
.Does this PR introduce a user-facing change?:
Additional documentation:
Checklist: