Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(store): remove cache on CosmosPolicyDefinitionStore #1976

Conversation

wolf4ood
Copy link
Contributor

@wolf4ood wolf4ood commented Sep 16, 2022

What this PR changes/adds

Removes in-memory local cache for CRUD and querying in CosmosPolicyDefinitionStore.

Why it does that

Cleanup and remove the limitation of local cache growth and querying mechanism.

Further notes

Linked Issue(s)

Closes #1965

Checklist

  • added appropriate tests?
  • performed checkstyle check locally?
  • added/updated copyright headers?
  • documented public classes/methods?
  • added/updated relevant documentation?
  • assigned appropriate label? (exclude from changelog with label no-changelog)
  • formatted title correctly? (take a look at the CONTRIBUTING and styleguide for details)

@wolf4ood wolf4ood self-assigned this Sep 16, 2022
@wolf4ood wolf4ood added the enhancement New feature or request label Sep 16, 2022
@wolf4ood wolf4ood temporarily deployed to Azure-dev September 16, 2022 13:41 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2022

Codecov Report

Merging #1976 (f2fdeb7) into main (ec694a4) will decrease coverage by 0.05%.
The diff coverage is 76.19%.

@@            Coverage Diff             @@
##             main    #1976      +/-   ##
==========================================
- Coverage   63.07%   63.01%   -0.06%     
==========================================
  Files         784      786       +2     
  Lines       16675    16627      -48     
  Branches     1085     1084       -1     
==========================================
- Hits        10518    10478      -40     
+ Misses       5704     5697       -7     
+ Partials      453      452       -1     
Impacted Files Coverage Δ
...smos/policy/store/CosmosPolicyDefinitionStore.java 83.33% <70.58%> (-7.98%) ⬇️
...zure/cosmos/dialect/CosmosConditionExpression.java 92.30% <100.00%> (+0.47%) ⬆️
.../transfer/provision/http/HttpWebhookExtension.java 82.75% <0.00%> (-1.12%) ⬇️
.../catalog/cache/FederatedCatalogCacheExtension.java 100.00% <0.00%> (ø)
...aceconnector/iam/did/IdentityDidCoreExtension.java 0.00% <0.00%> (ø)
...dataplane/sync/DataPlaneTransferSyncExtension.java 0.00% <0.00%> (ø)
...nector/core/defaults/DefaultServicesExtension.java
...or/azure/cosmos/CosmosClientProviderExtension.java
...r/core/controlplane/ControlPlaneCoreExtension.java
...ector/core/DataPlaneSelectorDefaultsExtension.java
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@paullatzelsperger paullatzelsperger left a comment

Choose a reason for hiding this comment

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

Cosmos does indeed support queries both using explicit indexes and iteration queries (see doc). Here is a gist that implements the indexed query, please incorporate it in the PR. In order to support the iteration query we need to tweak some of the innards of the cosmos query composition. Could you create another issue for that and link it?

@wolf4ood wolf4ood force-pushed the feature/1965_remove_cache_cosmospolicydefinitionstore branch from 6863ecb to f2fdeb7 Compare September 19, 2022 09:37
@wolf4ood wolf4ood temporarily deployed to Azure-dev September 19, 2022 09:38 Inactive
@paullatzelsperger paullatzelsperger merged commit 0d85e3f into eclipse-edc:main Sep 20, 2022
@wolf4ood wolf4ood deleted the feature/1965_remove_cache_cosmospolicydefinitionstore branch September 20, 2022 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Remove cache from CosmosPolicyDefinitionStore
3 participants