Ravi Nori has posted comments on this change. Change subject: engine: Introduction of command entity dao ......................................................................
Patch Set 5: (2 comments) http://gerrit.ovirt.org/#/c/26337/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCache.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCache.java: Line 10: public CommandEntity get(Guid commandId); Line 11: Line 12: public void remove(Guid commandId); Line 13: Line 14: public void put(Guid commandId, Guid parentCommandId, VdcActionType actionType, VdcActionParametersBase params); > parent or root command id? Will add root command id Line 15: http://gerrit.ovirt.org/#/c/26337/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java: Line 37: return commandMap.get(commandId); Line 38: } Line 39: Line 40: @Override Line 41: public synchronized void remove(Guid commandId) { > why do we have to synchronize the entire cache for that? The backend implementation of Map is HashMap, so if we dont synchronize we might run into issues. If I change the backend to ConcurrentHashMap I dont need to synchronize here? Please let me know your thoughts Line 42: commandMap.remove(commandId); Line 43: cmdEntityDao.remove(commandId); Line 44: } Line 45: -- To view, visit http://gerrit.ovirt.org/26337 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I463102d85de7558fbcab23585ad6b48cdc35c0a0 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Greg Padgett <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Ravi Nori <[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
