Alissa Bonas has posted comments on this change.

Change subject: core: fix redundant storage server conn in db
......................................................................


Patch Set 4: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/DisconnectStorageServerConnectionCommand.java
Line 39:         return returnValue;
Line 40:     }
Line 41: 
Line 42:     protected boolean disconnectStorage() {
Line 43:         return Backend.getInstance()
Again, yes we have runVdsCommand, but the above is not a new code, it was just 
moved from executeCommand to another method without changing the signature nor 
functionality, and I agree that moving to use runVdsCommand might be a more 
proper way, however that method might behave differently, has different error 
handling and different signature, and it is NOT the focus of this patch.
Line 44:                .getResourceManager()
Line 45:                .RunVdsCommand(
Line 46:                     VDSCommandType.DisconnectStorageServer,
Line 47:                         new 
ConnectStorageServerVDSCommandParameters(getParameters().getVdsId(), 
getParameters()


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageServerConnectionCommand.java
Line 22:              String connectionId = getConnection().getid();
Line 23:              if(StringUtils.isNotEmpty(connectionId)) {
Line 24:                  //remove the connection record from db
Line 25:                  
getDbFacade().getStorageServerConnectionDao().remove(connectionId);
Line 26:                  setSucceeded(true);
There are some cases when execution of an sql query fails.
For example - engine loses connection to db, the schema name is incorrectly 
defined in the engine, something is corrupted in the schema (table was deleted 
, for example)
In that case, I would expect that the api that is supposed to execute the query 
will indicate about such a failure.
Line 27:              }
Line 28:        }
Line 29:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iea5468371514bd2c7bc043a6c5520e2864a09fe8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to