Skip to content

CommandContextManager is misleading #82

Description

@smithmx

First, this is not allowed:

https://github.com/dolittle-runtime/Runtime/blob/d1c59c5546ac53a1d4ffe5fa03e0ce4cc80a32a4/Source/Commands.Coordination/CommandContextManager.cs#L13

You cannot use ThreadStatic in the context of a web application. At best it should be AsyncLocal.

However, a bigger problem is the idea of enlisting multiple commands within a single command context. A command is a transaction, you cannot have multiple commands, effectively multiple transactions, within a single context. Every command should create its own context.

┆Issue is synchronized with this Asana task

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions