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

RFC: Close Transactions On Daily Closing #211

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

volllly
Copy link
Contributor

@volllly volllly commented Oct 18, 2023

We want to introduce a ftReceiptCaseFlag to the Daily-Closing that closes all open transactions on the TSE.

Rendered

@volllly volllly added the rfc label Oct 18, 2023
@volllly volllly changed the title RFC: lose_transactions_on_daily_closing RFC: Close Transactions On Daily Closing Oct 18, 2023
@volllly volllly marked this pull request as ready for review October 18, 2023 12:33
@volllly volllly requested a review from a team as a code owner October 18, 2023 12:33
rfcs/0000-close-transactions-on-daily-closing.md Outdated Show resolved Hide resolved
The method `CloseOpenTransactionsOnTseAsync` looks like this which is inspired by the current [Fail-Transaction Receipt](https://github.com/fiskaltrust/middleware/blob/1a9abd80430e9dfecdd17289024e9d19e798d19b/queue/src/fiskaltrust.Middleware.Localization.QueueDE/RequestCommands/FailTransactionReceiptCommand.cs#L64-L77).

```cs
private CloseOpenTransactionsOnTseAsync(IEnumerable<long> currentStartedTransactionNumbers)
Copy link
Member

Choose a reason for hiding this comment

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

This only closes the open transactions of the current Queue, right (since transactionsToClose is not used, but the data from the _openTransactionsRepo)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've clarified the code a bit. It should finish the transactions on the TSE and remove them from the open transactions in the queue.


## Closing foreign Transactions

If a TSE is used by multiple Queues the Transactions of open other Queues will be closed as well.
Copy link
Member

Choose a reason for hiding this comment

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

Might make sense to protocol in the actionjournal which transactions were closed 🤔 in one entry, not X :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I've added pseudo code for that 🙏 I'm not sure though about the ActionJournal Type though

@TSchmiedlechner
Copy link
Member

Def like this idea 👍🏻 should make things a lot easier, we should have done it that way from the very beginning indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants