Skip to content
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 a workaround to prevent retrieving removed documents from MemDB #565

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

hackerwins
Copy link
Member

@hackerwins hackerwins commented Jun 28, 2023

What this PR does / why we need it:

Add a workaround to prevent retrieving removed documents from MemDB

Removed documents should be filtered out by the query, but somehow it does not work. This is a workaround.

val, err := txn.First(tblDocuments, "project_id_key_removed_at", projectID.String(), key.String(), gotime.Time{})

So this commit adds a workaround to prevent retrieving removed documents from MemDB.

Which issue(s) this PR fixes:

Related to #464

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #565 (0b7e9a1) into main (7eee551) will decrease coverage by 0.03%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
- Coverage   52.27%   52.24%   -0.03%     
==========================================
  Files          67       67              
  Lines        6797     6802       +5     
==========================================
+ Hits         3553     3554       +1     
- Misses       2806     2809       +3     
- Partials      438      439       +1     
Impacted Files Coverage Δ
server/backend/backend.go 0.00% <0.00%> (ø)
server/backend/database/memory/database.go 53.01% <33.33%> (-0.25%) ⬇️

@hackerwins hackerwins marked this pull request as ready for review June 28, 2023 06:24
@hackerwins hackerwins merged commit 23b0062 into main Jun 28, 2023
@hackerwins hackerwins deleted the prevent-retrieving-removed-documents branch June 28, 2023 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant