Skip to content

Conversation

alex-kulakov
Copy link
Contributor

@alex-kulakov alex-kulakov commented Apr 2, 2021

Resolves #126

Breaking changes.

Makes reprocessing not use SessionScope inside (it does not get session out of it and does not open any activation scopes). To compensate that I provided a way to pass a Session instance from outside by using DomainExtensions.WithExternalSession(this Domain, Session) extension or IExecutionConfiguration.WithExternalSession(this Domain, Session)

- Removed getting Session from SessionScope
- Added support for giving external session to reprocessing action execution
- Changed tests in order to be up-to-date
- Added Session.IsDisposed to be able to check external sessions
@alex-kulakov alex-kulakov requested a review from AlexUstinov April 2, 2021 15:25
@alex-kulakov alex-kulakov linked an issue Apr 2, 2021 that may be closed by this pull request
AlexUstinov
AlexUstinov previously approved these changes Apr 21, 2021
@@ -37,14 +33,33 @@ public IExecuteConfiguration WithTransactionOpenMode(TransactionOpenMode transac
return this;
}

public IExecuteConfiguration WithExternalSession(Session session)
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about renaming this to just WithSession ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I wanted the name to be as clear as possible. That's why I named it .WithExternalSession(). I believe we can rename WithXXX methods but in ExecutionContext I'd prefer the name which underlines nature of the instance, maybe keep ExternalSession or replace it with UserSession (because we don't open it) or something.

- removed commented code
- used ordinal comparison for strings
- some formatting applied
@alex-kulakov alex-kulakov merged commit c87a031 into 6.0 May 7, 2021
@alex-kulakov alex-kulakov deleted the 6.0-reprocessing-same-session-bug branch May 7, 2021 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reprocessing actions running may get the same session
2 participants