Enable replication separately from namespace replication (#8658)

## What changed?
- Add a new flag that controls whether clusters setup replication
streams to each other
- Feature flag to gate the new flag for compatibility
- Functional test to vet the changes

## Why?
Optimization to avoid excessive network activity when we only want
namespace replication.

## How did you test it?
- [x] built
- [x] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [x] added new functional test(s)

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
michaely520
2025-11-20 11:55:27 -08:00
committed by GitHub
parent 5f2b8cd122
commit d95c479731
14 changed files with 417 additions and 20 deletions

View File

@@ -11,8 +11,9 @@ import (
type Config struct {
NumberOfShards int32
EnableReplicationStream dynamicconfig.BoolPropertyFn
HistoryReplicationDLQV2 dynamicconfig.BoolPropertyFn
EnableReplicationStream dynamicconfig.BoolPropertyFn
EnableSeparateReplicationEnableFlag dynamicconfig.BoolPropertyFn
HistoryReplicationDLQV2 dynamicconfig.BoolPropertyFn
RPS dynamicconfig.IntPropertyFn
OperatorRPSRatio dynamicconfig.FloatPropertyFn
@@ -403,8 +404,9 @@ func NewConfig(
cfg := &Config{
NumberOfShards: numberOfShards,
EnableReplicationStream: dynamicconfig.EnableReplicationStream.Get(dc),
HistoryReplicationDLQV2: dynamicconfig.EnableHistoryReplicationDLQV2.Get(dc),
EnableReplicationStream: dynamicconfig.EnableReplicationStream.Get(dc),
EnableSeparateReplicationEnableFlag: dynamicconfig.EnableSeparateReplicationEnableFlag.Get(dc),
HistoryReplicationDLQV2: dynamicconfig.EnableHistoryReplicationDLQV2.Get(dc),
RPS: dynamicconfig.HistoryRPS.Get(dc),
OperatorRPSRatio: dynamicconfig.OperatorRPSRatio.Get(dc),