RemoteStorageEntry::read_only is an std::optional<bool>.
Storage::get_backend was treating read_only as a regular bool (likely a
residue left over from a refactor?). Operator bool on std::optional is
just a has_value check, so the backend storage gating was behaving as
read_only even if read_only was explicitly set to false.
const std::string_view operation_description,
const bool for_writing)
{
- if (for_writing && entry.config.read_only) {
+ if (for_writing && entry.config.read_only.value_or(false)) {
LOG("Not {} {} storage since it is read-only",
operation_description,
entry.config.shards.front().url.scheme());