Skip to content

Commit ee0266f

Browse files
codchenclaude
andcommitted
fix: preallocate conflictKeys slice to satisfy prealloc linter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3085ca3 commit ee0266f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

giga/deps/tasks/scheduler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (s *scheduler) DoExecute(work func()) {
170170

171171
func (s *scheduler) findConflicts(task *deliverTxTask) (bool, []int, []string) {
172172
var conflicts []int
173-
var conflictKeys []string
173+
conflictKeys := make([]string, 0, len(s.multiVersionStores))
174174
uniq := make(map[int]struct{})
175175
valid := true
176176
for _, mv := range s.multiVersionStores {

sei-cosmos/tasks/scheduler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (s *scheduler) DoExecute(work func()) {
170170

171171
func (s *scheduler) findConflicts(task *deliverTxTask) (bool, []int, []string) {
172172
var conflicts []int
173-
var conflictKeys []string
173+
conflictKeys := make([]string, 0, len(s.multiVersionStores))
174174
uniq := make(map[int]struct{})
175175
valid := true
176176
for _, mv := range s.multiVersionStores {

0 commit comments

Comments
 (0)