Closed irq0 closed 1 year ago
@irq0 does this happen every time ?
Nope, I've seen it once in the logs. Unfortunately none of the tests I did when I found it could reproduce it. I hoped someone can backtrack from the assertion to see what went unexpected
This might be a case where we need another fix like https://github.com/aquarist-labs/ceph/pull/235
Here's the code:
std::optional<std::vector<DBMultipart>> SQLiteMultipart::list_multiparts(
const std::string& bucket_name, const std::string& prefix,
const std::string& marker, const std::string& delim, const int& max_uploads,
bool* is_truncated
) const {
auto storage = conn->get_storage();
auto bucket_entries = storage->get_all<DBBucket>(
where(is_equal(&DBBucket::bucket_name, bucket_name))
);
if (bucket_entries.size() == 0) {
return std::nullopt;
}
ceph_assert(bucket_entries.size() == 1);
So that'll pick up all buckets with that name, regardless of deletion state.
(I haven't confirmed by testing, it just seems likely to me).