Skip to content

Commit

Permalink
Storage manager plugin does not reply with errors when queried key is…
Browse files Browse the repository at this point in the history
… not found (#620)
  • Loading branch information
OlivierHecart authored Dec 11, 2023
1 parent fa612ce commit e3a6c34
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions plugins/zenoh-plugin-storage-manager/src/replica/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,18 +550,6 @@ impl StorageService {
let mut storage = self.storage.lock().await;
match storage.get(stripped_key, q.parameters()).await {
Ok(stored_data) => {
// if key is not available, return Error
if stored_data.is_empty() {
log::info!("Requested key `{}` not found", q.key_expr());
if let Err(e) = q.reply(Err("Key not found".into())).res().await {
log::warn!(
"Storage {} raised an error replying a query: {}",
self.name,
e
)
}
return;
}
for entry in stored_data {
let sample = Sample::new(q.key_expr().clone(), entry.value)
.with_timestamp(entry.timestamp);
Expand Down

0 comments on commit e3a6c34

Please sign in to comment.