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

Warn instead of failing in double hashed client #14

Merged
merged 1 commit into from
Apr 5, 2023

Conversation

ischasny
Copy link
Contributor

@ischasny ischasny commented Apr 5, 2023

Rationale is that double hashed client has a larger surface for failure comparing to the regular client. It does multiple network roundtrips as well as a number of decryption operations in order to fullfill a single lookup. We should be striving for returning a consistent result to the user even if some parts of the query might fail. Logging instead of failing will also allow us to do finer grained debugging in dhfind if necessary. The next step will be to enable streaming to reduce time to the first result.

Rationale is that double hashed client has a larger surface for failure comparing to the regular client. It does multiple network roundtrips as well as a number of decryption operations in order to fullfill a single lookup. We should be striving for returning a consistent result to the user even if some parts of the query might fail. Logging instead of failing will also allow us to do finer grained debugging in dhfind if necessary. The next step will be to enable streaming to reduce time to the first result.
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.14 ⚠️

Comparison is base (7ce6d35) 51.76% compared to head (6b4a58f) 51.62%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   51.76%   51.62%   -0.14%     
==========================================
  Files          56       56              
  Lines        4694     4695       +1     
==========================================
- Hits         2430     2424       -6     
- Misses       2008     2015       +7     
  Partials      256      256              
Impacted Files Coverage Δ
find/client/http/dhash_client.go 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@willscott willscott left a comment

Choose a reason for hiding this comment

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

can these errors happen in normal operation, or does it indicate corruption?

my expectation here is that until we get providers writing pre-encrypted records to us this is something we should be watching for, so warning in the logs is warranted.

once we have per-encrypted records we may want to think about lowering the log level

@ischasny
Copy link
Contributor Author

ischasny commented Apr 5, 2023

can these errors happen in normal operation, or does it indicate corruption?

my expectation here is that until we get providers writing pre-encrypted records to us this is something we should be watching for, so warning in the logs is warranted.

once we have per-encrypted records we may want to think about lowering the log level

That can happen (and seems to be happening) during the normal operation. I've observed some 404s for a part of a query. I.e. when a value key exists but metadata does not for example. We know that that might happen because there are no transactions, no WAL. I will monitor that situation in dhfind. Agreed about lowering the scope once writer privacy is here.

@ischasny ischasny merged commit 2bb518c into main Apr 5, 2023
@masih masih deleted the ivan/warn-instead-of-failing-in-dhash-client branch April 5, 2023 10:32
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.

3 participants