Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
6.5.1, Cheshire-Cat
-
None
-
Untriaged
-
1
-
Unknown
Description
Problem
Couchbase-cli is not updating replication priority correctly.
This issue was raised on the forums
Steps to reproduce
I reproduced it using master branch (CC) and also using the CLI that compiles within the master branch.
From the UI, I simply create a replication, leaving everything as default except the replication priority, which I have toggled to "Low". The XDCR's log shows the following settings being passed in by UI:
2020-11-12T10:06:57.404-08:00 INFO GOXDCR.AdminPort: doCreateReplicationRequest
|
2020-11-12T10:06:57.405-08:00 INFO GOXDCR.AdminPort: Request parameters: justValidate=false, fromBucket=B1, toCluster=C2, toBucket=B2, settings=map[CollectionsMgtMulti:{map[CollectionsMgtMulti:0 filter_exp_del:0] map[collectionsExplicitMapping:false collectionsMigrationMode:false filterBypassExpiry:false filterDeletion:false filterExpiration:false]} bandwidth_limit:0 checkpoint_interval:600 compression_type:3 doc_batch_size_kb:2048 failure_restart_interval:10 filter_exp_del:{map[CollectionsMgtMulti:0 filter_exp_del:0] map[collectionsExplicitMapping:false collectionsMigrationMode:false filterBypassExpiry:false filterDeletion:false filterExpiration:false]} filter_expression: filter_skip_restream:false log_level:Info optimistic_replication_threshold:256 priority:Low source_nozzle_per_node:2 stats_interval:1000 target_nozzle_per_node:2 worker_batch_size:500]
|
2020-11-12T10:06:57.405-08:00 INFO GOXDCR.ReplMgr: Creating replication - justValidate=false, sourceBucket=B1, targetCluster=C2, targetBucket=B2, settings=map[CollectionsMgtMulti:{map[CollectionsMgtMulti:0 filter_exp_del:0] map[collectionsExplicitMapping:false collectionsMigrationMode:false filterBypassExpiry:false filterDeletion:false filterExpiration:false]} bandwidth_limit:0 checkpoint_interval:600 compression_type:3 doc_batch_size_kb:2048 failure_restart_interval:10 filter_exp_del:{map[CollectionsMgtMulti:0 filter_exp_del:0] map[collectionsExplicitMapping:false collectionsMigrationMode:false filterBypassExpiry:false filterDeletion:false filterExpiration:false]} filter_expression: filter_skip_restream:false log_level:Info optimistic_replication_threshold:256 priority:Low source_nozzle_per_node:2 stats_interval:1000 target_nozzle_per_node:2 worker_batch_size:500]
|
Note the above "priority:Low".
And the replication priority is indeed set to low once I check via "Edit" on the replication itself from the UI.
From the CLI, after a "repo sync couchbase-cli" and a compilation, I ran the following command:
neil.huang@NeilsMacbookPro:~/source/couchbase/install/bin$ ./couchbase-cli xdcr-replicate -c 127.0.0.1:9000 --username Administrator --password wewewe --create --xdcr-cluster-name C2 --xdcr-from-bucket B1 --xdcr-to-bucket B2 --priority Low
|
SUCCESS: XDCR replication created
|
The replication was created, but when I go to the UI and "Edit" the replication to validate the priority, it was indeed set to "High" per reported in the fourms.
Looking at the XDCR log, the corresponding entry to the CLI shows that the CLI did not pass in the correct settings, and thus XDCR uses the default setting, which was "High".
2020-11-12T10:24:57.682-08:00 INFO GOXDCR.AdminPort: doCreateReplicationRequest
|
2020-11-12T10:24:57.682-08:00 INFO GOXDCR.AdminPort: Request parameters: justValidate=false, fromBucket=B1, toCluster=C2, toBucket=B2, settings=map[]
|
2020-11-12T10:24:57.682-08:00 INFO GOXDCR.ReplMgr: Creating replication - justValidate=false, sourceBucket=B1, targetCluster=C2, targetBucket=B2, settings=map[]
|
2020-11-12T10:24:57.682-08:00 INFO GOXDCR.ReplMgr: Creating replication spec - justValidate=false, sourceBucket=B1, targetCluster=C2, targetBucket=B2, settings=map[]
|
I have not had the chance to try this out in 6.5.x per the forum's post reporter.
Logs
N/A