Summary:
Bulk jobs that support an execution-locality filter plan their worker set via
dsp.SetupAllNodesPlanningWithOracle(... SingleLocalityFilter ...), which returns
an empty instance slice (nil error) when no live instance matches the filter.
Callers must guard this empty case; not all do.
Concrete finding:
restore_processor_planning.go computes
chunkSize := int(math.Sqrt(float64(md.numImportSpans))) / numNodes with no guard
against numNodes == 0. A RESTORE execution-locality filter matching zero live
instances divides by zero (panic). IMPORT guards this explicitly ("no SQL
instances match ..."); other callers should be checked.
Next steps:
Epic CRDB-65504
Jira issue: CRDB-66930
Summary:
Bulk jobs that support an execution-locality filter plan their worker set via
dsp.SetupAllNodesPlanningWithOracle(... SingleLocalityFilter ...), which returnsan empty instance slice (nil error) when no live instance matches the filter.
Callers must guard this empty case; not all do.
Concrete finding:
restore_processor_planning.gocomputeschunkSize := int(math.Sqrt(float64(md.numImportSpans))) / numNodeswith no guardagainst
numNodes == 0. A RESTORE execution-locality filter matching zero liveinstances divides by zero (panic). IMPORT guards this explicitly ("no SQL
instances match ..."); other callers should be checked.
Next steps:
SetupAllNodesPlanningWithOraclecaller (backup, restore,compaction, revlog, merge, fingerprint) for empty-instance handling.
Epic CRDB-65504
Jira issue: CRDB-66930