Fixes: #8608
Backport: dumpling, firefly
Bucket instance id is a concatenation of zone name, rados instance id,
and a running counter. We need to allocate enough space to account zone
name length.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit
d2e86a66ca55685e04ffbfaa58452af59f381277)
if (!pmaster_bucket) {
uint64_t iid = instance_id();
uint64_t bid = next_bucket_id();
- char buf[32];
+ char buf[zone.name.size() + 48];
snprintf(buf, sizeof(buf), "%s.%llu.%llu", zone.name.c_str(), (long long)iid, (long long)bid);
bucket.marker = buf;
bucket.bucket_id = bucket.marker;