@Test public void testCopiedDirectoryStartsAllocationBeyondOriginal() { Map<String, ResolverResult> dirLayerMappings; try (FDBRecordContext context = database.openContext()) { dirLayerMappings = seedDirectoryLayer(context, primary, 20); } final Long maxMappedValue = dirLayerMappings.entrySet().stream() .max(ResolverMappingReplicatorTest::resolverResultComparator) .map(max -> max.getValue().getValue()) .orElseThrow(IllegalStateException::new); ResolverMappingReplicator replicator = new ResolverMappingReplicator(primary); replicator.copyTo(replica); try (FDBRecordContext context = database.openContext()) { for (int i = 0; i < 20; i++) { String key = "new-value-" + random.nextLong(); Long mapped = replica.resolve(context.getTimer(), key).join(); assertThat("new mapped values are all greater than max from original directory layer", mapped, is(greaterThan(maxMappedValue))); } } }
public void copyTo(LocatableResolver replica) { runner.asyncToSync(FDBStoreTimer.Waits.WAIT_LOCATABLE_RESOLVER_MAPPING_COPY, copyToAsync(replica)); }
ResolverMappingReplicator implements AutoCloseable { public void copyTo(LocatableResolver replica) { runner.asyncToSync(FDBStoreTimer.Waits.WAIT_LOCATABLE_RESOLVER_MAPPING_COPY, copyToAsync(replica)); } }
ResolverMappingReplicator implements AutoCloseable { public void copyTo(LocatableResolver replica) { runner.asyncToSync(FDBStoreTimer.Waits.WAIT_LOCATABLE_RESOLVER_MAPPING_COPY, copyToAsync(replica)); } ResolverMappingReplicator(@Nonnull LocatableResolver primary);  ResolverMappingReplicator(@Nonnull LocatableResolver primary,
                                     final int transactionRowLimit);  ResolverMappingReplicator(@Nonnull LocatableResolver primary,
                                     final int transactionRowLimit,
                                     final long transactionTimeLimitMillis); }
ResolverMappingReplicator implements AutoCloseable { public void copyTo(LocatableResolver replica) { runner.asyncToSync(FDBStoreTimer.Waits.WAIT_LOCATABLE_RESOLVER_MAPPING_COPY, copyToAsync(replica)); } ResolverMappingReplicator(@Nonnull LocatableResolver primary);  ResolverMappingReplicator(@Nonnull LocatableResolver primary,
                                     final int transactionRowLimit);  ResolverMappingReplicator(@Nonnull LocatableResolver primary,
                                     final int transactionRowLimit,
                                     final long transactionTimeLimitMillis); @Override void close(); void copyTo(LocatableResolver replica); CompletableFuture<Void> copyToAsync(@Nonnull final LocatableResolver replica); @Override String toString(); }
ResolverMappingReplicator implements AutoCloseable { public void copyTo(LocatableResolver replica) { runner.asyncToSync(FDBStoreTimer.Waits.WAIT_LOCATABLE_RESOLVER_MAPPING_COPY, copyToAsync(replica)); } ResolverMappingReplicator(@Nonnull LocatableResolver primary);  ResolverMappingReplicator(@Nonnull LocatableResolver primary,
                                     final int transactionRowLimit);  ResolverMappingReplicator(@Nonnull LocatableResolver primary,
                                     final int transactionRowLimit,
                                     final long transactionTimeLimitMillis); @Override void close(); void copyTo(LocatableResolver replica); CompletableFuture<Void> copyToAsync(@Nonnull final LocatableResolver replica); @Override String toString();  }