Nir Soffer has posted comments on this change. Change subject: utils: Add changehash function for change detection ......................................................................
Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/33045/4/lib/vdsm/utils.py File lib/vdsm/utils.py: Line 1231: h = hashlib.sha1() Line 1232: for s in strings: Line 1233: h.update(s) Line 1234: # Engine stores this in varchar(30) Line 1235: return h.hexdigest()[:30] > How likely are we to experience a hash collision since we're taking only th This break compatibility with old engines. I think we are safe, currently we are using 64 bit value, with this patch we are using 120 bit value. If we want more bits, we can use base64 encoding: >>> base64.b64encode(h.digest()) 'C+7Hteo/D9vJXQ3UfzxbwnXaijM=' >>> len(base64.b64encode(h.digest())) 28 -- To view, visit https://gerrit.ovirt.org/33045 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2242a594383e2d2fe64e3a581f18b8ac662648b0 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
