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

Suggestion: Encapsulate usage of ets tables #391

Closed
peterzeller opened this issue Oct 11, 2019 · 0 comments
Closed

Suggestion: Encapsulate usage of ets tables #391

peterzeller opened this issue Oct 11, 2019 · 0 comments
Assignees
Labels
code-style good first issue Issues that can probably be solved by people new to the Antidote codebase.

Comments

@peterzeller
Copy link
Member

We have a few places in the Antidote codebase that make use of ETS tables (search for ets:). It is not easy to see at a glance what is stored in the tables and whether any processes use the same table as shared memory.

For example: clocksi_readitem_server:get_active_txns_key_internal passes a table-id to clocksi_vnode:get_active_txns_key and it is not directly clear who owns the table.

I suggest to refactor this such that we have a separate module for each table that has a name / can be used in multiple modules. The module should have a clear API such that it is clear what is stored in the table.
Instead of passing around table names (atoms) or table-ids we could then use different custom types for the different tables.

@peterzeller peterzeller added code-style good first issue Issues that can probably be solved by people new to the Antidote codebase. labels Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-style good first issue Issues that can probably be solved by people new to the Antidote codebase.
Projects
None yet
Development

No branches or pull requests

2 participants