Commit f9ea4e95 authored by Waleed Akbar's avatar Waleed Akbar
Browse files

fix: Clear connection cache when no allowed links are found and adjust...

fix: Clear connection cache when no allowed links are found and adjust bandwidth range mappings in SyntheticSampler
parent 22a0b1a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -749,6 +749,7 @@ class EventDispatcher(BaseEventDispatcher):
        if not processed_links:
            LOGGER.debug('Connection {:s} has no allowed links for domain {:s}'.format(
                connection_uuid, domain_name))
            self._object_cache.delete(CachedEntities.CONNECTION, connection_uuid)
            return None

        # Cache the connection-to-links mapping for later retrieval (e.g., during REMOVE events)
+5 −5
Original line number Diff line number Diff line
@@ -41,11 +41,11 @@ class SyntheticSampler:
    
    # Connection count to (avg, min, max) percentage mapping
    BW_RANGES = {
        0: (3,  0,  10),
        1: (25, 10, 40),
        2: (45, 30, 60),
        3: (65, 50, 80),
        4: (85, 70, 90),
        0: (3,  1,  10),
        1: (25, 15, 30),
        2: (45, 35, 55),
        3: (65, 60, 80),
        4: (85, 80, 95),
    }

    @classmethod