Moti Asayag has posted comments on this change. Change subject: core: using JPA for engine backup awareness ......................................................................
Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/40091/4/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EngineBackupLog.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/EngineBackupLog.java: Line 96: && this.passed == other.passed : && Objects.equals(outputMessage, other.outputMessage) > 1. I'm not sure if that makes any difference from JPA perspective. specifically these entities aren't created by the engine, they are only being read - therefore they are considered immutable. Line 96: && this.passed == other.passed : && Objects.equals(outputMessage, other.outputMessage) > Please see https://docs.jboss.org/hibernate/stable/core.old/reference/en/ht according to the main guidances we're safe: we don't store that entity into a set/map, and we also don't reattach them. The only use case of those entities is read by getLastSuccessfulEngineBackup. But those points will become super-critical for entities which the system messes with, and by the look of it, without changing the equals() of those entities we'd might face a lot of primary-key constraint violations. In order not to block this patch - i don't see any need to change anything within this patch, as this entity should be considered immutable. I'd add the link you've attached here as a reply to Liran's mail which introduces the JPA to the community, or perhaps even open a wiki page and list the considerations of moving to JPA (which i suspect will be a growing list of items). -- To view, visit https://gerrit.ovirt.org/40091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia0aa9c4d0c8c0a5f7b40a022d7670f30c5fd5b77 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liran Zelkha <liran.zel...@gmail.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@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