cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rhtyd commented on issue #2927: server: fix unwanted txn commit warning messages
Date Fri, 26 Oct 2018 17:55:29 GMT
rhtyd commented on issue #2927: server: fix unwanted txn commit warning messages
URL: https://github.com/apache/cloudstack/pull/2927#issuecomment-433492118
 
 
   @rafaelweingartner wrt the old vs new implementation, there is not much change. We only
update when there is a change b/w old and new resource count values. The important thing is
to lock the rows from the point we decide to update for anybody reading will not get stale/old
values. The transaction was not necessary actually, the locking of rows should happen only
when there is a need for an update otherwise no need. Therefore, in the new/refactored logic
we check if there is a change between old vs new resource count values before deciding to
an update. The system as with other parts of the cloudstack are design to be eventually consistent.
The method `recalculateAccountResourceCount` is supposed to get the counts/stats eventually
consitent in db and is called by a periodic task (background thread), `updateResourceCount`
API, whenever template is synced or deleted, or recalculation of domain triggers it. I don't
see any race or locking issues.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message