Skip to content

[5.x]: Enable the use of a persisted FMRC cache#772

Merged
haileyajohnson merged 3 commits intoUnidata:maint-5.xfrom
lesserwhirls:fmrcCache
Jul 21, 2021
Merged

[5.x]: Enable the use of a persisted FMRC cache#772
haileyajohnson merged 3 commits intoUnidata:maint-5.xfrom
lesserwhirls:fmrcCache

Conversation

@lesserwhirls
Copy link
Copy Markdown
Member

@lesserwhirls lesserwhirls commented Jul 20, 2021

Description of Changes

In this PR, I've added hooks to allow for the runtime loading of a persisted FMRC cache (specifically, the GridDatasetInv objects). This is very much needed by the TDS. This does not need to be ported forward at this point. Unrelated, I also fixed two minor javadoc warnings. Closes #771.

PR Checklist

  • Indicate the version associated with this PR in the Title
    (e.g. "[5.x]: This is my PR title")
  • Link to any issues that the PR addresses
  • Add labels, especially if the PR should be ported to other versions
    (these labels start with "port: ")
  • Open as a draft PR
    until ready for review
  • Make sure GitHub tests pass
  • Mark PR as "Ready for Review"

This change is Reviewable

@lesserwhirls lesserwhirls added enhancement New feature or request ver5 version 5 only. labels Jul 20, 2021
@lesserwhirls lesserwhirls marked this pull request as ready for review July 20, 2021 20:55
Copy link
Copy Markdown
Contributor

@haileyajohnson haileyajohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 4 files at r1.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @lesserwhirls)


cdm/core/src/main/java/ucar/nc2/ft/fmrc/GridDatasetInv.java, line 213 at r1 (raw file):

    return lastModified.getTime();
  }

are we planning on using version and REQ_VERSION outside this class?

Copy link
Copy Markdown
Member Author

@lesserwhirls lesserwhirls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @haileyajohnson)


cdm/core/src/main/java/ucar/nc2/ft/fmrc/GridDatasetInv.java, line 213 at r1 (raw file):

Previously, haileyajohnson wrote…

are we planning on using version and REQ_VERSION outside this class?

I have code in the TDS ready to go in a PR that uses both of those. The inventory cache implementation checks to see if the version of the inventory object read from the cache is compatible with the version of netCDF-java in use. If it's not, the old version is purged from the cache. Right now, those two values are only absolutely needed for log messages that I produce. I could refactor to get rid of exposing them, I think. Let me see.

Copy link
Copy Markdown
Member Author

@lesserwhirls lesserwhirls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @haileyajohnson)


cdm/core/src/main/java/ucar/nc2/ft/fmrc/GridDatasetInv.java, line 213 at r1 (raw file):

Previously, lesserwhirls (Sean Arms) wrote…

I have code in the TDS ready to go in a PR that uses both of those. The inventory cache implementation checks to see if the version of the inventory object read from the cache is compatible with the version of netCDF-java in use. If it's not, the old version is purged from the cache. Right now, those two values are only absolutely needed for log messages that I produce. I could refactor to get rid of exposing them, I think. Let me see.

Done. How does that look?

Copy link
Copy Markdown
Contributor

@haileyajohnson haileyajohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @haileyajohnson)

@haileyajohnson
Copy link
Copy Markdown
Contributor

awesome, I'll merge when the tests finish!

@haileyajohnson haileyajohnson merged commit 3d240f5 into Unidata:maint-5.x Jul 21, 2021
@lesserwhirls lesserwhirls linked an issue Jul 21, 2021 that may be closed by this pull request
@lesserwhirls lesserwhirls deleted the fmrcCache branch August 14, 2021 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ver5 version 5 only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[5.x] FMRC on-disk cache

2 participants