eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

🔧 [Datastore] Datastore caches individually configurable #4075

Closed dseurotech closed 1 month ago

dseurotech commented 1 month ago

This PR adds the ability to override the default configuration for datastore caches on an individual basis. The following additional parameters can now be used to fine-tune caches:

# Specific caches overrides
# Clients cache overrides (if any value is omitted, the Local cache settings equivalent will be used)
#datastore.cache.clients.local.size.maximum=1100
#datastore.cache.clients.local.expire.after=120
#datastore.cache.clients.local.expire.strategy=TOUCHED
# Channels cache overrides (if any value is omitted, the Local cache settings equivalent will be used)
#datastore.cache.channels.local.size.maximum=1100
#datastore.cache.channels.local.expire.after=120
#datastore.cache.channels.local.expire.strategy=TOUCHED
# Metrics cache overrides (if any value is omitted, the Local cache settings equivalent will be used)
#datastore.cache.metrics.local.size.maximum=1100
#datastore.cache.metrics.local.expire.after=120
#datastore.cache.metrics.local.expire.strategy=TOUCHED
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 72.88136% with 16 lines in your changes missing coverage. Please review.

Project coverage is 41.56%. Comparing base (34ffc0a) to head (14f072e).

:exclamation: There is a different number of reports uploaded between BASE (34ffc0a) and HEAD (14f072e). Click for more details.

HEAD has 2 uploads less than BASE | Flag | BASE (34ffc0a) | HEAD (14f072e) | |------|------|------| ||20|18|
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4075/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## release-1.7.x #4075 +/- ## ==================================================== - Coverage 52.29% 41.56% -10.74% + Complexity 1864 1756 -108 ==================================================== Files 1631 1633 +2 Lines 46114 46161 +47 Branches 4231 4233 +2 ==================================================== - Hits 24116 19187 -4929 - Misses 20605 25650 +5045 + Partials 1393 1324 -69 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4075?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [...a/org/eclipse/kapua/commons/cache/CacheConfig.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fcache%2FCacheConfig.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvY2FjaGUvQ2FjaGVDb25maWcuamF2YQ==) | `100.00% <100.00%> (ø)` | | | [.../org/eclipse/kapua/commons/cache/ExpiryPolicy.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fcache%2FExpiryPolicy.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvY2FjaGUvRXhwaXJ5UG9saWN5LmphdmE=) | `100.00% <100.00%> (ø)` | | | [...mons/service/internal/cache/KapuaCacheManager.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fservice%2Finternal%2Fcache%2FKapuaCacheManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvc2VydmljZS9pbnRlcm5hbC9jYWNoZS9LYXB1YUNhY2hlTWFuYWdlci5qYXZh) | `69.33% <ø> (-10.16%)` | :arrow_down: | | [...vice/datastore/internal/DatastoreCacheManager.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=service%2Fdatastore%2Finternal%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fdatastore%2Finternal%2FDatastoreCacheManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9kYXRhc3RvcmUvaW50ZXJuYWwvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2RhdGFzdG9yZS9pbnRlcm5hbC9EYXRhc3RvcmVDYWNoZU1hbmFnZXIuamF2YQ==) | `100.00% <100.00%> (ø)` | | | [...tastore/internal/setting/DatastoreSettingsKey.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=service%2Fdatastore%2Finternal%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fdatastore%2Finternal%2Fsetting%2FDatastoreSettingsKey.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9kYXRhc3RvcmUvaW50ZXJuYWwvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2RhdGFzdG9yZS9pbnRlcm5hbC9zZXR0aW5nL0RhdGFzdG9yZVNldHRpbmdzS2V5LmphdmE=) | `100.00% <100.00%> (ø)` | | | [.../datastore/internal/setting/DatastoreSettings.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=service%2Fdatastore%2Finternal%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Fdatastore%2Finternal%2Fsetting%2FDatastoreSettings.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9kYXRhc3RvcmUvaW50ZXJuYWwvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2RhdGFzdG9yZS9pbnRlcm5hbC9zZXR0aW5nL0RhdGFzdG9yZVNldHRpbmdzLmphdmE=) | `86.36% <83.33%> (-13.64%)` | :arrow_down: | | [...va/org/eclipse/kapua/commons/cache/LocalCache.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fcache%2FLocalCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvY2FjaGUvTG9jYWxDYWNoZS5qYXZh) | `55.55% <33.33%> (-30.66%)` | :arrow_down: | | [...apua/commons/setting/AbstractBaseKapuaSetting.java](https://app.codecov.io/gh/eclipse/kapua/pull/4075?src=pr&el=tree&filepath=commons%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Fsetting%2FAbstractBaseKapuaSetting.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvc2V0dGluZy9BYnN0cmFjdEJhc2VLYXB1YVNldHRpbmcuamF2YQ==) | `23.38% <22.22%> (-76.62%)` | :arrow_down: | ... and [428 files with indirect coverage changes](https://app.codecov.io/gh/eclipse/kapua/pull/4075/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)