Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
137092: kvnemesis: increase the retry backoff for aborted txns r=miraradeva a=miraradeva

In #135173, we tried introducing a backoff in the transaction retry mechanism (in `db.Txn`) in order to help with large transactions that repeatedly get in a deadlock (as seen in #133431). This wasn't enough as we continue to see this type of failure in #136266.

This commit increases the kvnemesis-specific retry backoff, which is meant to prevent thrashing of aborted transactions. We do see transactions getting aborted as part of deadlock resolution in both of the failures mentioned above, so hopefully this will help. Both failures above are rare and hard to repro.

Fixes: #136266

Release note: None

137393: roachprod: respect AWS_PROFILE env var r=golgeek,vidit-bhat a=herkolategan

Previously, if the AWS_PROFILE env var was set roachprod did not forward it to the `aws cli`. This change automatically sets the profile to the AWS_PROFILE env var if it is not specified via the `--aws-profile` roachprod flag.

Epic: None
Release note: None

Co-authored-by: Mira Radeva <[email protected]>
Co-authored-by: Herko Lategan <[email protected]>
  • Loading branch information
3 people committed Dec 13, 2024
3 parents 5590074 + 69b1dcf + 4ace523 commit 047d1be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/kv/kvnemesis/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func applyOp(ctx context.Context, env *Env, db *kv.DB, op *Operation) {
// epochs of the same transaction to avoid waiting while holding locks.
retryOnAbort := retry.StartWithCtx(ctx, retry.Options{
InitialBackoff: 1 * time.Millisecond,
MaxBackoff: 250 * time.Millisecond,
MaxBackoff: 10 * time.Second,
})
var savedTxn *kv.Txn
txnErr := db.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/roachprod/vm/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func (o *ProviderOpts) ConfigureCreateFlags(flags *pflag.FlagSet) {

// ConfigureClusterFlags implements vm.ProviderOpts.
func (o *ProviderOpts) ConfigureClusterFlags(flags *pflag.FlagSet, _ vm.MultipleProjectsOption) {
flags.StringVar(&providerInstance.Profile, ProviderName+"-profile", providerInstance.Profile,
flags.StringVar(&providerInstance.Profile, ProviderName+"-profile", os.Getenv("AWS_PROFILE"),
"Profile to manage cluster in")
configFlagVal := awsConfigValue{awsConfig: *DefaultConfig}
providerInstance.Config = &configFlagVal.awsConfig
Expand Down

0 comments on commit 047d1be

Please sign in to comment.