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

core/aggsigdb: refactor to remove channel synchronization #1951

Closed
gsora opened this issue Mar 28, 2023 · 0 comments
Closed

core/aggsigdb: refactor to remove channel synchronization #1951

gsora opened this issue Mar 28, 2023 · 0 comments
Assignees
Labels
protocol Protocol Team tickets refactor Code refactoring V1

Comments

@gsora
Copy link
Collaborator

gsora commented Mar 28, 2023

🎯 Problem to be solved

The core/aggsigdb package relies on a clever scheme based on a goroutine and channels to synchronize access to two plain maps.

While this scheme works, it's prone to error and less efficient than a lock+map or sync.Map.

Refactor to leverage one of the two proposed schemes.

@gsora gsora added the refactor Code refactoring label Mar 28, 2023
@github-actions github-actions bot added the protocol Protocol Team tickets label Mar 28, 2023
@boulder225 boulder225 added the V1 label Mar 1, 2024
@pinebit pinebit self-assigned this Mar 6, 2024
obol-bulldozer bot pushed a commit that referenced this issue Mar 14, 2024
Introduce MemDBV2: instead of relying on a complex system based on channels and read/write queries, simply store objects in a `sync/map`.

Simpler to read and potentially faster in systems in which there's a high rate of goroutine contention.

Add the `aggsigdb_v2` feature flag to enable/disable this feature.

category: refactor
ticket: #1951  
feature_flag: aggsigdb_v2
@pinebit pinebit closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol Protocol Team tickets refactor Code refactoring V1
Projects
None yet
Development

No branches or pull requests

3 participants