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

Enable SpeeDB Feature: Constrain the interface of SharedOptions #740

Closed
udi-speedb opened this issue Nov 1, 2023 · 1 comment · Fixed by #742
Closed

Enable SpeeDB Feature: Constrain the interface of SharedOptions #740

udi-speedb opened this issue Nov 1, 2023 · 1 comment · Fixed by #742
Assignees

Comments

@udi-speedb
Copy link
Contributor

The SharedOptions class currently allows modifications that are not controlled, and may cause inconsistencies. It provides great flexibility, but is inherently unsafe.
For example, a user may change the size of the cache without an associated required change in the pinning policy capacity.

Until we provide safe and consistent interfaces to allow that flexibility, we will constrain the interface of SharedOptions. The result will be an immutable SharedOptions but one that is safe and easy to use correctly.

@udi-speedb udi-speedb self-assigned this Nov 1, 2023
@mrambacher
Copy link
Contributor

The example of changing the cache size can be accomplished without using SharedOptions. Given a Cache, I can call SetCapacity() and change its size and the PinningPolicy will be none the wiser. That issue (of associating a PinningPolicy with the Cache) should be raised separately and is independent of SharedOptions (the same could be said of thread counts and Env).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants