Replies: 6 comments 4 replies
-
If your method takes a long time to execute, then the transaction time will be extended. More information you can check the document: https://docs.abp.io/en/abp/latest/Unit-Of-Work |
Beta Was this translation helpful? Give feedback.
-
and IMO it shoudn't be the root uow in middlware (eg. the begin of the request ), |
Beta Was this translation helpful? Give feedback.
-
https://docs.abp.io/en/abp/latest/Unit-Of-Work#begin-a-new-unit-of-work requiresNew (bool): Set true to ignore the surrounding unit of work and start a new UOW with the provided options. Default value is false. If it is false and there is a surrounding UOW, Begin method doesn't actually begin a new UOW, but silently participates to the existing UOW.
This is the default design, you can remove You also can disable it if you want:https://docs.abp.io/en/abp/latest/Unit-Of-Work#default-options |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@realLiangshiwei @zhutoutou from here abp/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs Lines 366 to 372 in f17dfdc it seems that it may cause the unitofwork not distrubted trancational , and one might sucess and one might fail(may because network problem or the power supplier lose energy) do I miss something ? |
Beta Was this translation helpful? Give feedback.
-
@zhutoutou @realLiangshiwei |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
it seems that
UowMiddleware
create a rootUOW
, and createChildUnitOfWork
when you calling into_uowManagerr.Begin()
.and that will cause slow trancation commit if you are doing slow async work inside controller action.
I'm I right ?
Beta Was this translation helpful? Give feedback.
All reactions