Skip to content

Commit 41f1a21

Browse files
mohammadzaeemjimwwalker
authored andcommitted
MB-66368: Make magma_fusion_namespace_suffix a prefix
Change-Id: I13e75353433801face5734d70fd1ee5b9a9078e3 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/226691 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Rohan Suri <rohan.suri@couchbase.com> Reviewed-by: Jim Walker <jim@couchbase.com>
1 parent a2cc8af commit 41f1a21

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

engines/ep/configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,9 +1670,9 @@
16701670
"dynamic": true,
16711671
"type": "std::string"
16721672
},
1673-
"magma_fusion_namespace_suffix": {
1673+
"magma_fusion_namespace_prefix": {
16741674
"default": "kv",
1675-
"descr": "The fusion namespace format is <bucket_name>/<bucket_uuid>/<service_suffix>. This parameter encodes the <service_suffix> for KV.",
1675+
"descr": "The fusion namespace format is <service_prefix>/<bucket_name>/<bucket_uuid>. This parameter encodes the <service_prefix> for KV.",
16761676
"dynamic": false,
16771677
"type": "std::string"
16781678
},

engines/ep/src/ep_engine.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8007,9 +8007,9 @@ EventuallyPersistentEngine::getFusionStorageSnapshotInner(
80078007
return {cb::engine_errc::not_supported, {}};
80088008
}
80098009

8010-
const auto fusionNamespace = configuration.getCouchBucket() + "/" +
8011-
configuration.getUuid() + "/" +
8012-
configuration.getMagmaFusionNamespaceSuffix();
8010+
const auto fusionNamespace = configuration.getMagmaFusionNamespacePrefix() +
8011+
"/" + configuration.getCouchBucket() + "/" +
8012+
configuration.getUuid();
80138013

80148014
return kvBucket->getRWUnderlying(vbid)->getFusionStorageSnapshot(
80158015
fusionNamespace, vbid, snapshotUuid, validity);
@@ -8022,9 +8022,9 @@ cb::engine_errc EventuallyPersistentEngine::releaseFusionStorageSnapshotInner(
80228022
return cb::engine_errc::not_supported;
80238023
}
80248024

8025-
const auto fusionNamespace = configuration.getCouchBucket() + "/" +
8026-
configuration.getUuid() + "/" +
8027-
configuration.getMagmaFusionNamespaceSuffix();
8025+
const auto fusionNamespace = configuration.getMagmaFusionNamespacePrefix() +
8026+
"/" + configuration.getCouchBucket() + "/" +
8027+
configuration.getUuid();
80288028
return kvBucket->getRWUnderlying(vbid)->releaseFusionStorageSnapshot(
80298029
fusionNamespace, vbid, snapshotUuid);
80308030
}

engines/ep/src/kvstore/magma-kvstore/magma-kvstore_config.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ MagmaKVStoreConfig::MagmaKVStoreConfig(Configuration& config,
235235
"magma_fusion_metadatastore_uri",
236236
std::make_unique<ConfigChangeListener>(*this));
237237

238-
fusionNamespace = config.getCouchBucket() + "/" + config.getUuid() + "/" +
239-
config.getMagmaFusionNamespaceSuffix();
238+
fusionNamespace = config.getMagmaFusionNamespacePrefix() + "/" +
239+
config.getCouchBucket() + "/" + config.getUuid();
240240
fusionUploadInterval =
241241
std::chrono::seconds(config.getMagmaFusionUploadInterval());
242242
fusionLogCheckpointInterval =

engines/ep/tests/ep_testsuite.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6522,7 +6522,7 @@ static enum test_result test_mb19687_fixed(EngineIface* h) {
65226522
"ep_magma_data_compression_algo",
65236523
"ep_magma_fusion_logstore_uri",
65246524
"ep_magma_fusion_metadatastore_uri",
6525-
"ep_magma_fusion_namespace_suffix",
6525+
"ep_magma_fusion_namespace_prefix",
65266526
"ep_magma_fusion_upload_interval",
65276527
"ep_magma_fusion_log_checkpoint_interval",
65286528
"ep_magma_fusion_migration_rate_limit",
@@ -6879,7 +6879,7 @@ static enum test_result test_mb19687_fixed(EngineIface* h) {
68796879
"ep_magma_data_compression_algo",
68806880
"ep_magma_fusion_logstore_uri",
68816881
"ep_magma_fusion_metadatastore_uri",
6882-
"ep_magma_fusion_namespace_suffix",
6882+
"ep_magma_fusion_namespace_prefix",
68836883
"ep_magma_fusion_upload_interval",
68846884
"ep_magma_fusion_log_checkpoint_interval",
68856885
"ep_magma_fusion_migration_rate_limit",

engines/ep/tests/module_tests/magma_bucket_tests.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,9 @@ TEST_P(STMagmaFusionTest, Config) {
12011201
// Note: namespace not in bucket config, set internally at MagmaKVStore
12021202
// init
12031203
const auto& bucketConfig = engine->getConfiguration();
1204-
const auto fusionNamespace = bucketConfig.getCouchBucket() + "/" +
1205-
bucketConfig.getUuid() + "/" +
1206-
bucketConfig.getMagmaFusionNamespaceSuffix();
1204+
const auto fusionNamespace = bucketConfig.getMagmaFusionNamespacePrefix() +
1205+
"/" + bucketConfig.getCouchBucket() + "/" +
1206+
bucketConfig.getUuid();
12071207
EXPECT_EQ(fusionNamespace, kvstoreConfig.getFusionNamespace());
12081208

12091209
// The following configuration is propagated directly to magma

0 commit comments

Comments
 (0)