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

[Malleability] Update mapBackData to use generics and implement BackData #7073

Open
Tracked by #6646
UlyanaAndrukhiv opened this issue Feb 20, 2025 · 0 comments
Open
Tracked by #6646

Comments

@UlyanaAndrukhiv
Copy link
Contributor

UlyanaAndrukhiv commented Feb 20, 2025

Context

Currently implementation of MapBackData is tightly coupled to concrete types (flow.Identifier and flow.Entity) and does not leverage generics. This limits flexibility and type safety, especially as we move toward a more modular design for our BackData implementations. With the upcoming generics overhaul in BackData detailed in flow-go#7070, it is essential to update MapBackData to use generic type parameters. This change will decouple the implementation from fixed types and ensure consistency with the new BackData interface once flow-go#7070 is finalized.

Proposed Solution

Once the changes in flow-go#7070 are complete, refactor MapBackData to incorporate generic type parameters for both identifiers and entities. This will involve updating the underlying map and refactoring all its associated methods (such as Add, Remove, etc.) to use generics. The refactored implementation should continue to be non-thread-safe, with concurrency management delegated to the higher-level Backend, while fully conforming to the new BackData interface.

Defenition of done

Related issues

#6703
#7070

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

No branches or pull requests

1 participant