Use bucket space from existing put or multioperation command when
creating new create bucket commands.
@@ -116,7 +116,7 @@ PutOperation::checkCreateBucket(const lib::Distribution& dist,
// Send create buckets for all nodes in ideal state where we don't
// currently have copies.
for (uint32_t i = 0; i < createNodes.size(); i++) {
- document::Bucket bucket(BucketSpace::placeHolder(), entry.getBucketId());
+ document::Bucket bucket(originalCommand.getBucket().getBucketSpace(), entry.getBucketId());
std::shared_ptr<api::CreateBucketCommand> cbc(
new api::CreateBucketCommand(bucket));
if (active.contains(createNodes[i])) {
@@ -207,7 +207,7 @@ PutOperation::insertDatabaseEntryAndScheduleCreateBucket(
}
for (uint32_t i=0, n=copies.size(); i<n; ++i) {
if (!copies[i].isNewCopy()) continue;
- document::Bucket bucket(BucketSpace::placeHolder(), copies[i].getBucketId());
+ document::Bucket bucket(originalCommand.getBucket().getBucketSpace(), copies[i].getBucketId());
std::shared_ptr<api::CreateBucketCommand> cbc(
new api::CreateBucketCommand(bucket));
if (setOneActive && active.contains(copies[i].getNode().getIndex())) {
