mirror of https://github.com/apache/druid.git
fix bug with reference closing that I swore we fixed
This commit is contained in:
parent
aae8f4cf3c
commit
cb1798c520
|
@ -25,6 +25,8 @@ import com.metamx.common.guava.Yielder;
|
|||
import com.metamx.common.guava.YieldingAccumulator;
|
||||
import com.metamx.common.guava.YieldingSequenceBase;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class ReferenceCountingSequence<T> extends YieldingSequenceBase<T>
|
||||
|
@ -43,6 +45,7 @@ public class ReferenceCountingSequence<T> extends YieldingSequenceBase<T>
|
|||
OutType initValue, YieldingAccumulator<OutType, T> accumulator
|
||||
)
|
||||
{
|
||||
return new ResourceClosingYielder<OutType>(baseSequence.toYielder(initValue, accumulator), segment.increment());
|
||||
Closeable closeable = segment.increment();
|
||||
return new ResourceClosingYielder<OutType>(baseSequence.toYielder(initValue, accumulator), closeable);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue