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

refactor: remove Store type param in Instance #101

Merged
merged 4 commits into from Jul 18, 2022

Conversation

waynexia
Copy link
Member

Which issue does this PR close?

Related to #72 and #13

Rationale for this change

We support various ObjectStore implements to be assembled in a recursive way. Like CachedStore -> LocalStore + RemoteStore. The existing type param way that requires fully specifying a type would be hard to implement. For simplicity and feasibility, I change this type param to a trait object. A related discussion can be found at #72.

The CachedStore has been implemented but the corresponding config is not added yet. This PR also provides a way to config a storage cache layer. Example config has been updated to docs/example.toml

What changes are included in this PR?

This PR contains two changes:

  • refactor: remove Store type param in Instance
  • feat: add config for CachedStore

Maybe I need to separate it into two PRs

Are there any user-facing changes?

The config file has changed.

How does this change test

The refactor is tested by the compiler. New config is tested manually.

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia added the feature New feature or request label Jul 17, 2022
@waynexia waynexia added this to the Release v0.2 milestone Jul 17, 2022
@waynexia waynexia requested a review from ShiKaiWi July 17, 2022 08:49
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

LGTM

@waynexia waynexia merged commit 1592cd4 into apache:main Jul 18, 2022
@waynexia waynexia deleted the oss-config branch July 18, 2022 03:28
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* remove `Store` param in `Instance`

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* `ObjectStoreRef` type alias

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* `CacheOptions` for cached storage

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update example storage

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants