Remove transaction from updateCapacityForHost cal (#12421)

This commit is contained in:
Abhisar Sinha 2026-01-14 20:42:42 +05:30 committed by GitHub
parent 6a324da27a
commit 5c1f9315ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 7 deletions

View File

@ -294,13 +294,8 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi
Math.min(CapacityManager.CapacityCalculateWorkers.value(), hostIds.size())));
for (Long hostId : hostIds) {
futures.put(hostId, executorService.submit(() -> {
Transaction.execute(new TransactionCallbackNoReturn() {
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
final HostVO host = hostDao.findById(hostId);
_capacityMgr.updateCapacityForHost(host);
}
});
final HostVO host = hostDao.findById(hostId);
_capacityMgr.updateCapacityForHost(host);
return null;
}));
}