trafficcontrol icon indicating copy to clipboard operation
trafficcontrol copied to clipboard

Add Grove cache plugins

Open rob05c opened this issue 5 years ago • 1 comments

Which issue is fixed by this PR? If not related to an existing issue, what does this PR do?

Changes Grove caches to be plugins, so it's easy to extend Grove with new cache storage mechanisms and algorithms.

Also adds a memory Frecency cache, as an example of an alternative cache.

Which TC components are affected by this PR?

  • [ ] Documentation
  • [x] Grove
  • [ ] Traffic Analytics
  • [ ] Traffic Monitor
  • [ ] Traffic Ops
  • [ ] Traffic Ops ORT
  • [ ] Traffic Portal
  • [ ] Traffic Router
  • [ ] Traffic Stats
  • [ ] Traffic Vault
  • [ ] Other _________

What is the best way to verify this PR? Please include manual steps or automated tests.

(If no tests are part of this PR, please provide explanation as to why no tests are included.)

Run grove with existing cache configs, verify it still works. Set a plugin config, verify it works as expected.

(plugin config is like any other plugin. Example:

{
  "plugins": {
    "cache_mem_frecency": {
      "size_bytes": 50000,
      "hit_weight": 0.5
    },
    "cache_disk": {
      "mem_bytes": 5,
      "files": {
        "disk0": [
          {"path": "./disk0-0.db", "size_bytes": 100000},
          {"path": "./disk0-1.db", "size_bytes": 100000}
        ]
      }
    }
  }

Grove doesn't have an Integration Test framework yet.

Check all that apply

  • [ ] This PR includes tests
  • [ ] This PR includes documentation updates
  • [ ] This PR includes an update to CHANGELOG.md
  • [ ] This PR includes all required license headers
  • [ ] This PR includes a database migration (ensure that migration sequence is correct)
  • [ ] This PR fixes a serious security flaw. Read more: www.apache.org/security

rob05c avatar Mar 21 '19 17:03 rob05c

Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/trafficcontrol-PR/3385/ Test PASSed.

asfgit avatar Mar 21 '19 17:03 asfgit