Skip to content

[Question] DistributedSession CommitAsync #38370

Closed
@csturm83

Description

@csturm83

I'm a bit confused about how DistributedSession CommitAsync should work. The documentation states that it may throw if the data store is unavailable.

However, I see it exits early here without an exception if the cache is unavailable:

I suppose an exception could still be thrown in CommitAsync if the cache becomes unavailable after a successful initial Load.

I'll note that the Session Common Errors documentation here seems more strongly worded:

CommitAsync throws an exception if the backing store is unavailable. If CommitAsync fails, the app can process the exception. LoadAsync throws under the same conditions when the data store is unavailable.

I wonder if that may be a bit misleading? My initial interpretation when I read the Common Errors section was that CommitAsync will always fail when the cache is unavailable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThis issue tracks updating documentationarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsgood first issueGood for newcomers.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions