syncstorage-rs
syncstorage-rs copied to clipboard
one_or_none produces errors on one column results
The one_or_none
method occasionally emits errors on SQL that can only produce at most one result.
Seeing this occur from update_user_collection_quotas
, get_storage_timestamp
and lock_for_write_async
I believe the issue here is a bug in one_or_none
: it doesn’t notice its second call to next_async
could potentially be an Error
. It should always propagate errors from next_async
before validating its result (always call next_async().transpose()?
).
This was easy to miss because next_async
returns Option<Result>
(vs Result<Option>
) to match poll_next
(which it may rewritten into at some point).
┆Issue is synchronized with this Jira Task
The JIRA sync mistakenly closed this