Arik Hadas has posted comments on this change.

Change subject: engine: remove the use of @LockIdNameAttribute
......................................................................


Patch Set 8:

(2 comments)

http://gerrit.ovirt.org/#/c/25944/8/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/LockProperties.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/LockProperties.java:

Line 2: 
Line 3: public class LockProperties {
Line 4: 
Line 5:     public static enum Scope { Execution, Manual, None }
Line 6:     private Scope scope = Scope.None;
> It is scoping, as automatic release == scope.
Right, manual/automatic scope is something that might be useful as we currently 
don't have "manual" scope - the infrastructure will always try to release the 
lock either at the end of the execute or at the end of the end-action phase (if 
it has not been released before).

But even if we only consider automatic scope - there are two options: to 
release it at the end of the execute or keep it until the end-action phase, 
that's what I suggest to define as duration since it is different from scope.
Line 7:     private boolean wait = true;
Line 8: 
Line 9:     private LockProperties() {}
Line 10: 


Line 3: public class LockProperties {
Line 4: 
Line 5:     public static enum Scope { Execution, Manual, None }
Line 6:     private Scope scope = Scope.None;
Line 7:     private boolean wait = true;
> Locks are usually default to wait, this is what expected by users(developer
Yeah, in the general use-case you're right but the locks here are IMO special 
kind of locks, engine locks, which should be customized to our use-case. in 
general locks are not associated with domain-specific groups (LockingGroup) and 
are not a composition of pairs of group and error message - so new developer 
would need to learn the engine locking mechanism anyway I think
Line 8: 
Line 9:     private LockProperties() {}
Line 10: 
Line 11:     public boolean isWait() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie57e4f7c00ebcd6a4e9e0e61b7d26f50f2d00858
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to