Liron Ar has posted comments on this change.

Change subject: db: aggregate qos and storage qos impl
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.ovirt.org/#/c/27094/6/packaging/dbscripts/upgrade/03_05_0330_qos_and_storage_impl.sql
File packaging/dbscripts/upgrade/03_05_0330_qos_and_storage_impl.sql:

Line 21: ) WITH OIDS;
Line 22: 
Line 23: ALTER TABLE qos ADD CONSTRAINT fk_qos_storage_pool FOREIGN KEY 
(storage_pool_id)
Line 24:       REFERENCES storage_pool (id) MATCH SIMPLE
Line 25:       ON UPDATE NO ACTION ON DELETE CASCADE;
> I might be missing something, but this is the class signature:
first of all, i haven't noticed that we save the pool state in a method called 
"removeDomains" which isn't that trivial, so sorry for that.

what caused the confusion is that the pool is actually removed from the db as 
the before last operation in the executeCommand() method.
    @Override
    protected void executeCommand() {..
handle...
..

getStoragePoolDAO().remove(getStoragePool().getId());
MacPoolManager.getInstance().freeMacs(macsToRemove);

so unless the engine will crush between the pool removal from the DB and the 
compensation context clearance in CommandeBase which happens immediately after, 
the pool is removed from the db . We should inspect generally the usage of the 
compensation and the flow of that command as there are many things that could 
be changed there, so i'm not sure that justifies change the implementation of 
the qos.
Line 26: 
Line 27: -- add index on storage_pool_id
Line 28: CREATE INDEX IDX_qos_storage_pool_id ON qos (storage_pool_id);
Line 29: 


-- 
To view, visit http://gerrit.ovirt.org/27094
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1a9af59277b5055453159f002f19046c0051d63b
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to