Skip to content

Commit

Permalink
sql/schemachanger: apply admission control to merge phase of backfill
Browse files Browse the repository at this point in the history
Previously, when merging indexes as a part of our MVCC-compliant
protocol, we did not properly flag the writes with the correct priority.
As a result, on certain workloads, creating a secondary index could tank
performance. To address this, this patch will set the priority for the
writes during the merge phase of the backfill protocol.

Fixes: #113705

Release note (performance): Address performance regression that can
happen when the declarative schema changer is being used to creating an
index with a concurrent workload.
  • Loading branch information
fqazi committed Nov 2, 2023
1 parent ef4b0db commit 6fdf6b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/sql/backfill/mvcc_index_merger.go
Expand Up @@ -386,7 +386,8 @@ func (ibm *IndexBackfillMerger) merge(
}
}
return nil
})
},
isql.WithPriority(admissionpb.BulkNormalPri))

return err
}
Expand Down

0 comments on commit 6fdf6b1

Please sign in to comment.