Skip to content

Commit

Permalink
Fix order of incref/ensureopen
Browse files Browse the repository at this point in the history
  • Loading branch information
henningandersen committed Jan 25, 2024
1 parent 912e4cd commit aba358a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -860,11 +860,11 @@ private AbstractRunnable fillGapRunnable(CacheFileRegion cacheFileRegion, RangeM
return new AbstractRunnable() {
@Override
protected void doRun() throws Exception {
ensureOpen();
if (cacheFileRegion.tryIncRef() == false) {
throw new AlreadyClosedException("File chunk [" + cacheFileRegion.regionKey + "] has been released");
}
try {
ensureOpen();
final int start = Math.toIntExact(gap.start());
var ioRef = io;
assert regionOwners.get(ioRef) == cacheFileRegion;
Expand Down

0 comments on commit aba358a

Please sign in to comment.