Open ejortegau opened 1 year ago
Actually, the issue description text is factually incorrect - my bad, I had missed this when I filed it. The config seems to be passed here - though it seems to take a while to be used to increase the rate. I am going to close this.
Re-opening after realizing that one parameter - Initial Max Rate - is indeed not being applied. Bug description has been updated.
Overview of the Issue
The transaction throttler takes several config parameters. Specifically, the docs indicate the following:
However, at the very least the initial rate is not being passed to the max replication lag module that is used by the transaction throttler. This can be seen by checking code calls as follows:
TabletServer's TxThrottler is created here using txthrottler.NewTxThrottler(). That ends up instantiating a txThrottlerState which in turn creates a Throttler via throttler.NewThrottler() and the throttler.newThrottler(). The last one of those instantiates a
MaxReplicationLagModule
and, while doing so, uses NewMaxReplicationLagModuleConfig() which only clones the default configuration and overrides the MaxReplicationLagSec attribute. Other attributes in the configuration are only being passed to the underlyingMaxReplicationLagModule
later by callingThrottler.UpdateConfiguration()
, but this is done after the newMaxReplicationLagModule
instance has been created and set to have a rate that matches the one passed in the configuration (which had the default one of 100). Therefore, theMaxReplicationLagoModule
always starts with an initial rate of100
(the default) instead of the one passed by the CLI arguments.Reproduction Steps
Start vttablet with:
Tail -f the vttablet log. Notice these messages:
showing that the rate that it is using is the one coming from default config instead of the one coming from the CLI flag.
Binary Version
Operating System and Environment details
Log Fragments