MCPcopy
hub / github.com/pingcap/tidb / prefetchDataCache

Method prefetchDataCache

pkg/executor/insert.go:182–194  ·  view source on GitHub ↗
(ctx context.Context, txn kv.Transaction, rows []toBeCheckedRow)

Source from the content-addressed store, hash-verified

180}
181
182func (e *InsertValues) prefetchDataCache(ctx context.Context, txn kv.Transaction, rows []toBeCheckedRow) error {
183 // Temporary table need not to do prefetch because its all data are stored in the memory.
184 if e.Table.Meta().TempTableType != model.TempTableNone {
185 return nil
186 }
187
188 defer tracing.StartRegion(ctx, "prefetchDataCache").End()
189 values, err := prefetchUniqueIndices(ctx, txn, rows)
190 if err != nil {
191 return err
192 }
193 return prefetchConflictedOldRows(ctx, txn, rows, values)
194}
195
196// updateDupRow updates a duplicate row to a new row.
197func (e *InsertExec) updateDupRow(

Callers 2

execMethod · 0.80
batchUpdateDupRowsMethod · 0.80

Calls 5

StartRegionFunction · 0.92
prefetchUniqueIndicesFunction · 0.85
MetaMethod · 0.65
EndMethod · 0.65

Tested by

no test coverage detected