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

DeltaValueIter is not Send #4471

Closed
skyzh opened this issue Jun 12, 2023 · 0 comments · Fixed by #4472
Closed

DeltaValueIter is not Send #4471

skyzh opened this issue Jun 12, 2023 · 0 comments · Fixed by #4472
Labels
t/bug Issue Type: Bug

Comments

@skyzh
Copy link
Member

skyzh commented Jun 12, 2023

Steps to reproduce

By asserting Send bound on DeltaValueIter.

Expected result

Should be Send.

Actual result

Is not Send because we have a RwLockGuard inside it. This can cause troubles in the future, as we can only read all the keys (use up the iterator) in an async environment. Given the iterator is not send, we cannot await (yield to other futures) when holding the iterator. We should refactor it to remove the lock guard someday when we want true concurrency.

Environment

Logs, links

@skyzh skyzh added the t/bug Issue Type: Bug label Jun 12, 2023
problame added a commit that referenced this issue Jun 12, 2023
... by switching the internal RwLock to a OnceCell.

This is preliminary work for/from #4220 (async `Layer::get_value_reconstruct_data`).

See #4462 (comment)
for more context.

fixes #4471
problame added a commit that referenced this issue Jun 12, 2023
... by switching the internal RwLock to a OnceCell.

This is preliminary work for/from #4220 (async `Layer::get_value_reconstruct_data`).

See #4462 (comment)
for more context.

fixes #4471
problame added a commit that referenced this issue Jun 12, 2023
... by switching the internal RwLock to a OnceCell.

This is preliminary work for/from #4220 (async `Layer::get_value_reconstruct_data`).

See #4462 (comment)
for more context.

fixes #4471
awestover pushed a commit that referenced this issue Jun 14, 2023
... by switching the internal RwLock to a OnceCell.

This is preliminary work for/from #4220 (async `Layer::get_value_reconstruct_data`).

See #4462 (comment)
for more context.

fixes #4471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant