[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #OIV-218948]: caching netcdf variables in thredds



> But are there any debug messages for the event when it takes file handle
> from cache?

Yes. The class in question is FileCache:
https://github.com/Unidata/thredds/blob/5.0.0/cdm/src/main/java/ucar/nc2/util/cache/FileCache.java

The clearCache(), eject(), and cleanup() methods actually close the 
NetcdfFiles, which releases the underlying file handles.
Look for "cacheLog" to see the messages that are logged.

> Moreover why it locks the file handle as it should open file in
> read mode only. It should lock only if it is writing the file.

I had the same thought. As I did not write any of the code I can only 
speculate. Maybe FileCache is used somewhere to manage writeable files?

-Christian

Ticket Details
===================
Ticket ID: OIV-218948
Department: Support THREDDS
Priority: High
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.