wei liu 68bd064228
fix: Fix concurrent map access panic in CopySegmentTask (#46829)
issue: #44358

The panic "concurrent map iteration and map write" was introduced in PR
#44361. It occurred when QueryCopySegment RPC iterated segmentResults
while copySingleSegment was updating it concurrently.

- Deep copy segmentResults in Clone() to avoid shared map reference
- Return map copy in GetSegmentResults() to prevent iteration conflict
- Update tests to get task from manager after Update() operations

This fix follows the same deep-copy pattern used in ImportTask and
L0ImportTask.

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2026-01-07 12:41:24 +08:00
..