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

[Improvement] Local cache should be turned off by default #4246

Closed
lw-yang opened this issue Jul 23, 2024 · 7 comments · Fixed by #4901
Closed

[Improvement] Local cache should be turned off by default #4246

lw-yang opened this issue Jul 23, 2024 · 7 comments · Fixed by #4901
Assignees
Labels
0.7.0 Release v0.7.0 improvement Improvements on everything

Comments

@lw-yang
Copy link
Contributor

lw-yang commented Jul 23, 2024

What would you like to be improved?

In production environments, multiple Gravitino instances are typically deployed, which can lead to data inconsistency issues with local caching.

If data is deleted in one instance and then retrieved from another instance, the cache in the second instance may still contain the data.

In our scenario, we encountered an inconsistency issue, after deleting a role and then attempting to retrieve it, found the data still exists

Therefore, local caching should be disabled by default, allowing users to evaluate and choose whether to enable it.

Alternatively, a caching framework can be provided, allowing users to select the caching implementation, such as local caching or distributed caching.

How should we improve?

No response

@lw-yang lw-yang added the improvement Improvements on everything label Jul 23, 2024
@lw-yang
Copy link
Contributor Author

lw-yang commented Jul 23, 2024

cc @jerryshao @jerqi

@shaofengshi
Copy link
Contributor

For single instance deployment, local cache is still valid; I think the point is, when deploy it into multi-instances, should use external shared cache like a redis, instead of using local cache.

@lw-yang
Copy link
Contributor Author

lw-yang commented Jul 24, 2024

In production environment, it is impossible to have only single instance deployed. If other companies deploy production
environments, they will encounter the same issue.

Given that Gravitino currently does not support configuring external shared cache, local cache should be disabled by default to avoid data inconsistency in production environment.

@jerryshao
Copy link
Contributor

We're going to remove this local cache, as the number of roles will be significantly dropped after we refactor to use ownership mechanism.

@jerqi
Copy link
Contributor

jerqi commented Aug 21, 2024

@lw-yang Do you like to submit a pull request to fix the issue?

@lw-yang
Copy link
Contributor Author

lw-yang commented Aug 21, 2024

@jerqi Ok, I would like to fix it

@jerqi
Copy link
Contributor

jerqi commented Sep 9, 2024

@jerqi Ok, I would like to fix it

Gently ping. Will you continue this work?

@jerqi jerqi added 0.6.1 0.7.0 Release v0.7.0 labels Sep 10, 2024
github-actions bot pushed a commit that referenced this issue Sep 12, 2024
### What changes were proposed in this pull request?

Remove role local cache

### Why are the changes needed?

Fix: #4246 

### Does this PR introduce _any_ user-facing change?

/

### How was this patch tested?

exist ut

Co-authored-by: Qi Yu <[email protected]>
jerryshao pushed a commit that referenced this issue Sep 12, 2024
### What changes were proposed in this pull request?

Remove role local cache

### Why are the changes needed?

Fix: #4246 

### Does this PR introduce _any_ user-facing change?

/

### How was this patch tested?

exist ut

Co-authored-by: lwyang <[email protected]>
Co-authored-by: Qi Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.7.0 Release v0.7.0 improvement Improvements on everything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants