-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implement the TM provider of Local-TM #34
Conversation
JadynWong
commented
Jul 29, 2022
•
edited
Loading
edited
- EFCore DbProvider
- Mongo DbProvider
- UTs
- Docs
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/TransactionManagers/LocalTmManager.cs
Outdated
Show resolved
Hide resolved
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/TransactionManagers/LocalTmManager.cs
Outdated
Show resolved
Hide resolved
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/TransactionManagers/LocalTmManager.cs
Outdated
Show resolved
Hide resolved
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/TransactionManagers/LocalTmManager.cs
Outdated
Show resolved
Hide resolved
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/TransactionManagers/LocalTmManager.cs
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/Store/MemoryLocalTmStore.cs
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/Store/ILocalTmStore.cs
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/Steps/LocalTmStepExecutor.cs
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/Models/TmTransactionModel.cs
Outdated
Show resolved
Hide resolved
...ders.LocalTm/Stepping/TmProviders/LocalTm/DistributedLocks/DefaultSteppingDistributedLock.cs
Outdated
Show resolved
Hide resolved
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/HostedService/LocalTmHostedService.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JadynWong - What do you think about these:
- Create a
Stepping.TmProvider.LocalTm.HostedServiceProcessor
project. Move the HostedService and the distributed lock to it. - Rename the project
Stepping.TmProvider.LocalTm
toStepping.TmProvider.LocalTm.Core
. - Create a new
Stepping.TmProvider.LocalTm
project that depends onStepping.TmProvider.LocalTm.Core
andStepping.TmProvider.LocalTm.HostedServiceProcessor
.
That means if someone doesn't want to use the hosted service but (maybe) Hangfire or else, he doesn't need to care about the implementation of ISteppingDistributedLock
and installs only the Stepping.TmProvider.LocalTm.Core
package.
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/HostedService/LocalTmHostedService.cs
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm.EfCore/Stepping.TmProviders.LocalTm.EfCore.csproj
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm.MongoDb/Stepping.TmProviders.LocalTm.MongoDb.csproj
Outdated
Show resolved
Hide resolved
...mProviders.LocalTm.MongoDb/Stepping/TmProviders/LocalTm/MongoDb/LocalTmMongoDbInitializer.cs
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/Steps/LocalTmStepExecutor.cs
Outdated
Show resolved
Hide resolved
...pping.TmProviders.LocalTm/Stepping/TmProviders/LocalTm/HostedService/LocalTmHostedService.cs
Outdated
Show resolved
Hide resolved
...Stepping.TmProviders.LocalTm.Core/Stepping/TmProviders/LocalTm/Steps/LocalTmStepInfoModel.cs
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm.Core/Stepping/TmProviders/LocalTm/Steps/LocalTmStepExecutor.cs
Outdated
Show resolved
Hide resolved
...Stepping.TmProviders.LocalTm.Core/Stepping/TmProviders/LocalTm/Steps/ILocalTmStepExecutor.cs
Outdated
Show resolved
Hide resolved
...rs.LocalTm.HostedServiceProcessor/Stepping.TmProviders.LocalTm.HostedServiceProcessor.csproj
Outdated
Show resolved
Hide resolved
src/Stepping.TmProviders.LocalTm.MongoDb/Stepping.TmProviders.LocalTm.MongoDb.csproj
Outdated
Show resolved
Hide resolved
04e1295
to
fa5bc4a
Compare
I created a test app project for local TM. It seems that submitting without invoking the prepare API cause error. Please support this case. |
Resolved. |
42331ed
to
9e6270d
Compare
@JadynWong - I made this change and expected Step2 could retry after 2s, but it takes about 1min: Stepping.NET/test/Stepping.TmProviders.LocalTm.TestApp/Program.cs Lines 60 to 66 in de60baf
|
…e `GetPendingList`
@JadynWong - Great implementation! It's all LGTM. I added a new to-do "Docs" in the top comment. I believe we can merge this PR when it is completed. |
Signed-off-by: Jadyn <jadyn.wong@live.com>