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

fix(replication): do not reply an error when a key is not found #912

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

J-Loudet
Copy link
Contributor

@J-Loudet J-Loudet commented Apr 8, 2024

As discussed internally, a reply to a query should not return an error when a key does not exist — this is a perfectly valid situation.

In addition, this prevented the replication from correctly functioning: as an error was always returned by the storage that was actually looking for the data, other replies were not processed and that storage would thus never receive anything.

  • plugins/zenoh-plugin-storage-manager/src/replica/storage.rs: deleted the code replying an error to a query looking for a key the storage does not have.

As discussed internally, a reply to a query should not return an error
when a key does not exist — this is a perfectly valid situation.

In addition, this prevented the replication from correctly functioning:
as an error was always returned by the storage that was actually
looking for the data, other replies were not processed and that storage
would thus never receive anything.

* plugins/zenoh-plugin-storage-manager/src/replica/storage.rs: deleted
  the code replying an error to a query looking for a key the storage
  does not have.

Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
@Mallets Mallets merged commit d594afb into main Apr 10, 2024
15 checks passed
@Mallets Mallets deleted the fix/replication-query-no-error branch April 10, 2024 14:05
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.

None yet

2 participants