Skip to content

Commit

Permalink
Adds TODOs related to #94
Browse files Browse the repository at this point in the history
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
  • Loading branch information
manoelcampos committed Aug 28, 2020
1 parent 0148706 commit 5050318
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -380,6 +380,7 @@ private List<Host> extractHostListFromMigrationMap(final Map<Vm, Host> migration
* @param overloadedHosts the list of overloaded Hosts
* @return the new VM placement map where each key is a VM
* and each value is the Host to place it.
* @TODO See issue in {@link #getVmsToMigrateFromOverloadedHost(Host)}
*/
private Map<Vm, Host> getMigrationMapFromOverloadedHosts(final Set<Host> overloadedHosts) {
if(overloadedHosts.isEmpty()) {
Expand Down Expand Up @@ -480,6 +481,11 @@ private List<Vm> getVmsToMigrateFromOverloadedHosts(final Set<Host> overloadedHo
}

private List<Vm> getVmsToMigrateFromOverloadedHost(final Host host) {
/*
@TODO The method doesn't just gets a list of VMs to migrate from an overloaded Host,
but it temporarily destroys VMs on such Hosts.
See https://github.com/manoelcampos/cloudsim-plus/issues/94
*/
final List<Vm> vmsToMigrate = new LinkedList<>();
while (true) {
final Vm vm = getVmSelectionPolicy().getVmToMigrate(host);
Expand Down Expand Up @@ -614,6 +620,10 @@ private void saveAllocation() {

/**
* Restore VM allocation from the allocation history.
* TODO: The allocation map only needs to be restored because
* VMs are destroyed in order to assess a new VM placement.
* After fixing this issue, there will be no need to restore VM mapping.
* https://github.com/manoelcampos/cloudsim-plus/issues/94
*
* @see #savedAllocation
*/
Expand Down

0 comments on commit 5050318

Please sign in to comment.