ostream& operator<<(ostream& out, const ghobject_t& o)
{
out << o.hobj;
- if (o.generation != ghobject_t::NO_GEN) {
+ if (o.generation != ghobject_t::NO_GEN ||
+ o.shard_id != ghobject_t::NO_SHARD) {
assert(o.shard_id != ghobject_t::NO_SHARD);
out << "/" << o.generation << "/" << (unsigned)(o.shard_id);
}
t += snprintf(t, end - t, ".%llx", (long long unsigned)oid.hobj.pool);
snprintf(t, end - t, ".%.*X", (int)(sizeof(oid.hobj.hash)*2), oid.hobj.hash);
- if (oid.generation != ghobject_t::NO_GEN) {
- assert(oid.shard_id != ghobject_t::NO_SHARD);
-
+ if (oid.generation != ghobject_t::NO_GEN ||
+ oid.shard_id != ghobject_t::NO_SHARD) {
t += snprintf(t, end - t, ".%llx", (long long unsigned)oid.generation);
t += snprintf(t, end - t, ".%x", (int)oid.shard_id);
}
t += snprintf(t, end - t, "%llx", (long long unsigned)oid.hobj.pool);
full_name += string(buf);
- if (oid.generation != ghobject_t::NO_GEN) {
- assert(oid.shard_id != ghobject_t::NO_SHARD);
+ if (oid.generation != ghobject_t::NO_GEN ||
+ oid.shard_id != ghobject_t::NO_SHARD) {
full_name.append("_");
t = buf;