Liron Aravot has posted comments on this change.

Change subject: core: AuditLogDirector tests and some cleanups
......................................................................


Patch Set 5: I would prefer that you didn't submit this

(1 inline comment)

PropertyInfo holds an instance PropertyDescriptor. PropertyDescriptor might 
have synchronized methods and you have no garuantee for thread safety.

making it to have only one instance will create bottleneck for all system or 
concurrent access which can be hazardous..

....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
Line 950:     }
Line 951: 
Line 952:     // No need to iterate on the AuditLogable properties every 
invocation, just do it once
Line 953:     private static final List<PropertyInfo> auditLogableProperties = 
TypeCompat.GetProperties(AuditLogableBase.class);
Line 954: 
PropertyInfo holds an instance PropertyDescriptor.
PropertyDescriptor might have synchronized methods and you have no garuantee 
for thread safety.

making it to have only one instance will create bottleneck for all system or 
concurrent access which can be hazardous..
Line 955:     static Map<String, String> getAvailableValues(AuditLogableBase 
logable) {
Line 956:         Map<String, String> returnValue = new HashMap<String, 
String>(logable.getCustomValues());
Line 957:         for (PropertyInfo propertyInfo : auditLogableProperties) {
Line 958:             Object value = propertyInfo.GetValue(logable, null);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6cb777a39dbe19510d8a0466e6dff80da1b234ba
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to