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

Minimal TOC #4860

Merged
merged 2 commits into from Aug 27, 2018
Merged

Minimal TOC #4860

merged 2 commits into from Aug 27, 2018

Conversation

jason-bragg
Copy link
Contributor

Minimal transfer of coordintation support for transactions.

  • TransactionCommitter facet
  • Changed to commit logic to commit only upon successfull remot service call.
  • Minima golden path tests

Minimal transfer of coordintation support for transactions.
- TransactionCommitter facet
- Changed to commit logic to commit only upon successfull remot service call.
- Minima golden path tests
@jason-bragg
Copy link
Contributor Author

@dotnet-bot test functional please

/// <summary>
/// An identifier of the current transaction. Can be used for tracing and debugging.
/// </summary>
string CurrentTransactionId { get; }
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Attempting to keep surface clean. The transactionId, even it's existence, is an implementation detail for ITransactionalState.

Copy link
Contributor

Choose a reason for hiding this comment

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

I disagree. It's not an implementation detail. It is part of the public transaction API. I find it useful and use it in my tests and my workload.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If needed, call should be added to the TransactionContext, not the facet.

foreach (var actual in actualValues)
{
Assert.Equal(expected, actual);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a check somewhere in this test to check the remote service has been called and succeed, since otherwise we are not really testing toc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been verified manually via logging, as the test service only logs at this time. When we build out a more complete test service, we can add verification that service was called. I'll add a comment in the code to add this in future a pass.

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm verify via logging is far less then ideal. but I'm ok with fixing it in future pass

[InlineData(TransactionTestConstants.SingleStateTransactionalGrain, TransactionTestConstants.MaxCoordinatedTransactions)]
[InlineData(TransactionTestConstants.DoubleStateTransactionalGrain, TransactionTestConstants.MaxCoordinatedTransactions / 2)]
[InlineData(TransactionTestConstants.MaxStateTransactionalGrain, 1)]
public virtual async Task MultiGrainWriteTransaction(string grainStates, int grainCount)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we also add a simple failure test case? if the remote service failed to commit, then transaction abort. I think minimal testing for toc should include at least one successful path testing and one failure path testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this time, we've committed only to the public surface and minimal golden path (which does not include failure testing). We'll be adding more testing to this in future passes.

@jason-bragg
Copy link
Contributor Author

@dotnet-bot test functional please

@xiazen
Copy link
Contributor

xiazen commented Aug 23, 2018

do you want to merge this, or you are still waiting for other people to participate?

@xiazen xiazen merged commit 9fc28d9 into dotnet:master Aug 27, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants