read knob (#11111)
Co-authored-by: yaoxiao-github <yaoxiao@Yaos-MacBook-Pro-14.local>
This commit is contained in:
parent
35efd7b048
commit
3af49dc07e
|
@ -903,7 +903,8 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
init( READ_HOT_SUB_RANGE_CHUNK_SIZE, 10000000); // 10MB
|
||||
init( EMPTY_READ_PENALTY, 20 ); // 20 bytes
|
||||
init( DD_SHARD_COMPARE_LIMIT, 1000 );
|
||||
init( READ_SAMPLING_ENABLED, false ); if ( randomize && BUGGIFY ) READ_SAMPLING_ENABLED = true;// enable/disable read sampling
|
||||
init( READ_SAMPLING_ENABLED, false ); if ( randomize && BUGGIFY ) READ_SAMPLING_ENABLED = true;// enable/disable read sampling
|
||||
init( DD_PREFER_LOW_READ_UTIL_TEAM, false );
|
||||
init( DD_TRACE_MOVE_BYTES_AVERAGE_INTERVAL, 120);
|
||||
init( MOVING_WINDOW_SAMPLE_SIZE, 10000000); // 10MB
|
||||
|
||||
|
|
|
@ -912,6 +912,7 @@ public:
|
|||
int64_t EMPTY_READ_PENALTY;
|
||||
int DD_SHARD_COMPARE_LIMIT; // when read-aware DD is enabled, at most how many shards are compared together
|
||||
bool READ_SAMPLING_ENABLED;
|
||||
bool DD_PREFER_LOW_READ_UTIL_TEAM;
|
||||
// Rolling window duration over which the average bytes moved by DD is calculated for the 'MovingData' trace event.
|
||||
double DD_TRACE_MOVE_BYTES_AVERAGE_INTERVAL;
|
||||
int64_t MOVING_WINDOW_SAMPLE_SIZE;
|
||||
|
|
|
@ -1469,10 +1469,14 @@ ACTOR Future<Void> dataDistributionRelocator(DDQueue* self,
|
|||
} else {
|
||||
destTeamSelect = TeamSelect::ANY;
|
||||
}
|
||||
PreferLowerReadUtil preferLowerReadTeam =
|
||||
SERVER_KNOBS->DD_PREFER_LOW_READ_UTIL_TEAM || rd.reason == RelocateReason::REBALANCE_READ
|
||||
? PreferLowerReadUtil::True
|
||||
: PreferLowerReadUtil::False;
|
||||
auto req = GetTeamRequest(destTeamSelect,
|
||||
PreferLowerDiskUtil::True,
|
||||
TeamMustHaveShards::False,
|
||||
PreferLowerReadUtil::True,
|
||||
preferLowerReadTeam,
|
||||
PreferWithinShardLimit::True,
|
||||
ForReadBalance(rd.reason == RelocateReason::REBALANCE_READ),
|
||||
inflightPenalty,
|
||||
|
@ -2282,6 +2286,9 @@ ACTOR Future<Void> BgDDLoadRebalance(DDQueue* self, int teamCollectionIndex, Dat
|
|||
state const bool readRebalance = isDataMovementForReadBalancing(reason);
|
||||
state const char* eventName = isDataMovementForMountainChopper(reason) ? "BgDDMountainChopper" : "BgDDValleyFiller";
|
||||
state int ddPriority = dataMovementPriority(reason);
|
||||
state PreferLowerReadUtil preferLowerReadTeam = readRebalance || SERVER_KNOBS->DD_PREFER_LOW_READ_UTIL_TEAM
|
||||
? PreferLowerReadUtil::True
|
||||
: PreferLowerReadUtil::False;
|
||||
state double rebalancePollingInterval = 0;
|
||||
|
||||
loop {
|
||||
|
@ -2320,10 +2327,11 @@ ACTOR Future<Void> BgDDLoadRebalance(DDQueue* self, int teamCollectionIndex, Dat
|
|||
PreferLowerReadUtil::False,
|
||||
PreferWithinShardLimit::False,
|
||||
ForReadBalance(readRebalance));
|
||||
|
||||
GetTeamRequest destReq = GetTeamRequest(!mcMove ? TeamSelect::WANT_TRUE_BEST : TeamSelect::ANY,
|
||||
PreferLowerDiskUtil::True,
|
||||
TeamMustHaveShards::False,
|
||||
PreferLowerReadUtil::True,
|
||||
preferLowerReadTeam,
|
||||
PreferWithinShardLimit::False,
|
||||
ForReadBalance(readRebalance));
|
||||
state Future<SrcDestTeamPair> getTeamFuture =
|
||||
|
|
Loading…
Reference in New Issue