Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,13 @@ public void testSecondaryIsolationGroupsBookies() throws Exception {
defaultBookieGroup.put(BOOKIE5, BookieInfo.builder().rack("rack1").build());

Map<String, BookieInfo> primaryIsolatedBookieGroup = new HashMap<>();
primaryIsolatedBookieGroup.put(BOOKIE1, BookieInfo.builder().rack("rack1").build());
// Use the same rack as in the default group to avoid non-deterministic rack
// resolution when the same bookie appears in multiple groups with different racks.
primaryIsolatedBookieGroup.put(BOOKIE1, BookieInfo.builder().rack("rack0").build());

Map<String, BookieInfo> secondaryIsolatedBookieGroup = new HashMap<>();
secondaryIsolatedBookieGroup.put(BOOKIE2, BookieInfo.builder().rack("rack0").build());
secondaryIsolatedBookieGroup.put(BOOKIE4, BookieInfo.builder().rack("rack0").build());
secondaryIsolatedBookieGroup.put(BOOKIE2, BookieInfo.builder().rack("rack1").build());
secondaryIsolatedBookieGroup.put(BOOKIE4, BookieInfo.builder().rack("rack1").build());

bookieMapping.put("default", defaultBookieGroup);
bookieMapping.put(isolatedGroup, primaryIsolatedBookieGroup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,11 @@ public void testRemoveNonExistBundleData()
executorService.submit(latch::countDown);
latch.await();

// Ensure lm1 has loaded broker data from both brokers before writing bundle data.
// Without this, lm1 may only see bundles from one broker, causing fewer than
// bundleNumbers bundles to be written to the metadata store.
lm1.updateAll();

loadManagerWrapper.writeResourceQuotasToZooKeeper();

MetadataCache<BundleData> bundlesCache = pulsar1.getLocalMetadataStore().getMetadataCache(BundleData.class);
Expand Down
Loading