Add minor state check to PartitionedLookupSourceFactory
PartitionedLookupSourceFactory#createLookupSourceProvider() should be
called before the factory is destroyed. Otherwise, the returned future
will never complete.
@@ -151,6 +151,7 @@ public final class PartitionedLookupSourceFactory
{
lock.writeLock().lock();
try {
+ checkState(!destroyed.isDone(), "already destroyed");
if (lookupSourceSupplier != null) {
return immediateFuture(new SpillAwareLookupSourceProvider());
}
