-
Notifications
You must be signed in to change notification settings - Fork 27
mongodb busiCall 中允许添加返回是否自动提交事务 #74
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
Conversation
| } | ||
| } | ||
|
|
||
| public static async Task MongoCall(this BranchBarrier bb, IMongoClient mc, Func<IClientSessionHandle, Task<bool>> busiCall) |
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.
两个方法代码重合度很高,最好做一个抽取
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.
两个方法代码重合度很高,最好做一个抽取
好的,我重新提交了
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
==========================================
- Coverage 70.99% 69.10% -1.90%
==========================================
Files 44 44
Lines 1903 1903
Branches 0 180 +180
==========================================
- Hits 1351 1315 -36
Misses 552 552
- Partials 0 36 +36 ☔ View full report in Codecov by Sentry. |
mongodb busiCall 中有些场景需要直接在内部终止事务,目前只能通过抛出异常,被MongoCall中的catch捕获后,终止。我添加了一个新的MongoCall方法,并且在
busiCallFunction中 添加了Task<bool>返回值