Skip to content

Commit

Permalink
Add minor state check to PartitionedLookupSourceFactory
Browse files Browse the repository at this point in the history
PartitionedLookupSourceFactory#createLookupSourceProvider() should be
called before the factory is destroyed. Otherwise, the returned future
will never complete.
  • Loading branch information
wenleix committed Dec 15, 2018
1 parent e850e16 commit 2598dce
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public ListenableFuture<LookupSourceProvider> createLookupSourceProvider()
{
lock.writeLock().lock();
try {
checkState(!destroyed.isDone(), "already destroyed");
if (lookupSourceSupplier != null) {
return immediateFuture(new SpillAwareLookupSourceProvider());
}
Expand Down

0 comments on commit 2598dce

Please sign in to comment.