Skip to content

Commit

Permalink
remote_segment::maybe_materialize_index return false on failure
Browse files Browse the repository at this point in the history
previously, a couple of failure paths would a default true, this is a
problem for code after this that assumes the existance of objects after
this function

related to redpanda-data#11060
  • Loading branch information
andijcr committed Jun 13, 2023
1 parent e95d54d commit 023b5bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/v/cloud_storage/remote_segment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -654,15 +654,14 @@ ss::future<bool> remote_segment::maybe_materialize_index() {
"Failed to materialize index '{}'. Error: {}",
path,
std::current_exception());
co_return false;
}
co_await cache_item->body.close();
co_return true;
} else {
vlog(_ctxlog.info, "Index '{}' is not available", path);
co_return false;
}

// TODO (abhijat) start returning false here when the index is required to
// be materialized.
co_return true;
}

// NOTE: Aborted transactions handled using tx_range manifests.
Expand Down

0 comments on commit 023b5bb

Please sign in to comment.