Comments (5)
My apologies, I obviously didnt get that refactor right. Its intermittent because it deals with the case of producing an uncompressed file, which it then leaves in place.
The logic is rather fiendish, probably we should roll the PR back until I can fix. Umm, how do you do that?
from netcdf-java.
No need to apologize! That's why we have tests :-) I can roll back just the nexrad changes, but I think I found the underlying problem. As part of your PR, you moved to using try-with-resource here:
Good stuff. Within that try-with-resource block, we acquire a lock. Cool. The whole try-with-resource block concludes with a finally:
netcdf-java/cdm/src/main/java/ucar/nc2/iosp/nexrad2/Level2VolumeScan.java
Lines 789 to 795 in b935573
but by that point, we're out of the try block and the source has been closed, so the channel is closed and sad times ensue. The lock isn't valid anymore (lock.isValid() = false
) by the time we do the null check, as it appears to get released when we move out of the try block, so maybe we don't need a finally block anymore? Or maybe add a log message in case we get there and the lock is still valid somehow?
} finally {
if (lock != null && lock.isValid()) {
log.error("Uncompresed file is closed but the lock is still valid. Why is you the way you is, file lock?");
}
} // try-with-resource
from netcdf-java.
I dont understand then why it wouldnt fail every time?
from netcdf-java.
I think it's because the lock is only obtained when decompressing, otherwise lock=null
. The test bombs out on the first file it encounters that needs to be decompressed.
from netcdf-java.
Ok, I have it in the debugger and I agree with your analysis. I think we could just ditch the finally block all together.
from netcdf-java.
Related Issues (20)
- [VERSION]: 5.5.2 Exception thrown when accessing char data from NetcdfDatasets.openNcmlDataset
- Exception when opening twoD grib collection as a coverage
- Missing GRIB-1 time range indicators HOT 6
- netcdfAll-5.5.3.jar Unable to release handle after reading file HOT 1
- Build failed due to `gretty:2.0.1` HOT 3
- Some NetCDF data cannot be read by `ucar.nc2.dataset.NetcdfDataset` HOT 7
- DOC: Oudated link to ncml XSD in NCML documentation HOT 1
- Unlimited dimension cannot work without a specified length HOT 3
- Lambert conformal projection does not respect units of the false northing/easting
- BUFR delayed replication descriptor HOT 4
- cdm-radial: Parsing issues with radar files from IDEAM Colombia HOT 4
- Contributors guide says to branch off of `develop`, which appears not to exist
- Grib2 reader issue for data using second order packing and a bitmap section HOT 2
- Problems opening Zipped datasets HOT 3
- Broken link on https://www.unidata.ucar.edu/blogs/news/entry/netcdf-java-version-5-51 webpage HOT 1
- Unpacked values from scaled/offset dataset are all NaN. HOT 6
- Fix order of Enhancements to use packed fillValues for comparisons to packed data HOT 1
- ZarrIosp claims any zipped dataset HOT 8
- Configurable time units when using dateFormatMark
- Multithreaded access with both file cache and dataset cache fails HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netcdf-java.