public void update(Map<String, NamespaceBundleStats> bundleStats, int topk) {
        arr.clear();
        try {
            var isLoadBalancerSheddingBundlesWithPoliciesEnabled =
                    pulsar.getConfiguration().isLoadBalancerSheddingBundlesWithPoliciesEnabled();
            for (var etr : bundleStats.entrySet()) {
                String bundle = etr.getKey();
                // TODO: do not filter system topic while shedding
                if (NamespaceService.isSystemServiceNamespace(NamespaceBundle.getBundleNamespace(bundle))) {
                    continue;
                }
                if (!isLoadBalancerSheddingBundlesWithPoliciesEnabled && hasPolicies(bundle)) {
                    continue;
                }
                arr.add(etr);
            }
            var topKBundlesLoadData = loadData.getTopBundlesLoadData();
            topKBundlesLoadData.clear();
            if (arr.isEmpty()) {
                return;
            }
            topk = Math.min(topk, arr.size());
            partitionSort(arr, topk);

            for (int i = topk - 1; i >= 0; i--) {
                var etr = arr.get(i);
                topKBundlesLoadData.add(
                        new TopBundlesLoadData.BundleLoadData(etr.getKey(), (NamespaceBundleStats) etr.getValue()));
            }
        } finally {
            arr.clear();
        }
    }
@Test
    public void testSystemNamespace() {
        Map<String, NamespaceBundleStats> bundleStats = new HashMap<>();
        var topKBundles = new TopKBundles(pulsar);
        NamespaceBundleStats stats1 = new NamespaceBundleStats();
        stats1.msgRateIn = 500;
        bundleStats.put("pulsar/system/0x00000000_0x0FFFFFFF", stats1);

        NamespaceBundleStats stats2 = new NamespaceBundleStats();
        stats2.msgRateIn = 10000;
        bundleStats.put(bundle1, stats2);

        topKBundles.update(bundleStats, 2);

        assertEquals(topKBundles.getLoadData().getTopBundlesLoadData().size(), 1);
        var top0 = topKBundles.getLoadData().getTopBundlesLoadData().get(0);
        assertEquals(top0.bundleName(), bundle1);
    }