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

Eliminate dependency on im; just mutate the client cache #1897

Closed
wants to merge 5 commits into from

Conversation

gefjon
Copy link
Contributor

@gefjon gefjon commented Oct 24, 2024

Description of Changes

This turns out to be effectively a prerequisite for client-side indices. Storing indexes in a type-erased way
while making them Clone for storage in im::HashMap is likely possible, but it's at least very challenging and complex. Given that we no longer actually need the concurrent persistence offered by im::HashMap, it seems easier to just revert to using std::collections::HashMap.

API and ABI breaking changes

Breaks SDK codegen. No user-facing breakage.

Expected complexity level and risk

2 - minor risk of deadlocks because the SDK's concurrency story is pretty complex, but well-tested so likely safe.

Testing

  • SDK test suite

This turns out to be effectively a prerequisite for client-side indices.
Storing indexes in a type-erased way
while making them `Clone` for storage in `im::HashMap`
is likely possible, but it's at least very challenging and complex.
Given that we no longer actually need the concurrent persistence offered by `im::HashMap`,
it seems easier to just revert to using `std::collections::HashMap`.
Copy link
Contributor

@mamcx mamcx left a comment

Choose a reason for hiding this comment

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

LGTM, but I think needs more eyes.

@bfops bfops added the release-any To be landed in any release window label Oct 28, 2024
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

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

Looks good, but I'd ask that this go after 2 websocket/sdk PRs I have.

@bfops bfops removed the api-break label Nov 11, 2024
Copy link
Contributor

@kazimuth kazimuth left a comment

Choose a reason for hiding this comment

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

This all makes sense to me, but I'm not that familiar with the rust sdk so I'm not confident approving.

@gefjon
Copy link
Contributor Author

gefjon commented Nov 29, 2024

Included in #1909 ; merging that and closing this.

@gefjon gefjon closed this Nov 29, 2024
@bfops bfops added the api-break A PR that makes an API breaking change label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-break A PR that makes an API breaking change release-any To be landed in any release window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants