java-topology/defects/flink/patch/flink-deeper-CLEAN.md

1.3 KiB
Raw Permalink Blame History

UNDF: UNDF-2026-000000072

flink-deeper — PipelinedRegionSchedulingStrategy + EdgeManagerBuildUtil CLEAN

Files Scanned

  • flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/strategy/PipelinedRegionSchedulingStrategy.java
  • flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/EdgeManagerBuildUtil.java

Verdict: CLEAN

PipelinedRegionSchedulingStrategy

All membership-tested collections use appropriate hash-based structures:

  • scheduledRegionsCollections.newSetFromMap(new IdentityHashMap<>()) → O(1) contains
  • crossRegionConsumedPartitionGroupsCollections.newSetFromMap(new IdentityHashMap<>()) → O(1) contains
  • partitionGroupConsumerRegionsIdentityHashMap keyed lookup → O(1)
  • regionsToScheduleHashSet<SchedulingPipelinedRegion> → O(1) contains

isRegionSchedulable() calls regionToSchedule.contains(region) and scheduledRegions.contains(region) — both O(1). No CWE-407 present.

EdgeManagerBuildUtil

No membership tests (contains, anyMatch) inside loops. The utility builds edge connectivity structures by iterating once over input lists and writing to output lists/maps. Pattern is O(V × E) construction with no quadratic membership checks.

Scan date: 2026-03-27