On 08/02/12 17:21, Michael Kublin wrote:
Hi All,
Today most of the flows of runAction at engine look like at the following way:
1. Perform some selects
2. Perform call to host (xml rpc) or call to some number of other actions in synchronous
way
3. If a call success than perform update to DB.
There are also the following flows to consider -
* An action that is internal to the engine and does not involve a round
trip to the host, like all MLA related flows, quota etc.
* An action that is not internal but commits before the round trip to
the host like adding entities to db or changing entities status.
In addition we need to figure how this idea works when moving to JPA.
It is means that we actually need open transaction only at the step
3, it is mean that by default
we are keeping transaction much more longer than it should be, the call to host can take
a while.
So, the possible plan of action is
1. Change a default scope of transaction from TransactionScopeOption.Required to
TransactionScopeOption.Suppress
2. Remove annotation NonTransactiveCommandAttribute
3. The actions which are need to run in transaction - appropriate transaction scope
should be passed via parameters
It is a lot of dirty and not to interesting work, but I think it will provide a great
benefit:
1. Reduced a time of open transaction
2. Better db connection utilization
3. I think that number of open transaction will also reduce
4. As a result performance will improve
By the way, many of new actions which are written today by default marked as
NonTransactiveCommandAttribute, if we will continue
in such way almost every class will be marked with NonTransactiveCommandAttribute
Regards Michael
_______________________________________________
Engine-devel mailing list
Engine-devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel