Issue 765: Refactor AuditLog hash calculation

issues
Status:closed
Assigned To:Guest
Type:Defect
Area:Skyline
Priority:3
Milestone:20.2
Opened:2020-12-17 18:01 by Rita Chupalov
Changed:2022-02-28 15:05 by Brendan MacLean
Resolved:2021-12-16 14:31 by Rita Chupalov
Resolution:Fixed
Closed:2022-02-28 15:05 by Brendan MacLean
2020-12-17 18:01 Rita Chupalov
Title»Refactor AuditLog hash calculation
Assigned To»ritach
Type»Defect
Area»Skyline
Priority»3
According to Nick, we should remove the Hash from AuditLogEntry, and only calculate it during loading and saving.
See PR https://github.com/ProteoWizard/pwiz/pull/1355

  From the Hangouts conversation:
"The one thing that really worried me was the implementation of the getter for "AuditLogEntry.Hash", where it calcualtes the hash on demand the first time it is asked for.
  It's hard to write code like that and have it be thread-safe. Also, it makes debugging in Visual Studio a little trickier because displaying the value in the Locals window might cause things to change.
  I'm thinking the class "AuditLogHash" should not have two hashes in it. The way to do hash validation is to read in the list of entries with the hashes from the log file, and then construct a new list of entries with recalculated hashes, and ensure that the hashes in the two lists are the same."

2021-12-16 14:31 Rita Chupalov
resolve as Fixed
Statusopen»resolved
Milestone»20.2

2022-02-28 15:05 Brendan MacLean
close
Statusresolved»closed
Assigned Toritach»Guest