start hashing conditions content#1891
Conversation
|
☀️ The build tests passed at 849985e.
N.B. These results were obtained from a build of this Pull Request at 849985e after being merged into the base branch at e8de2a4. For more information, please check the job page here. |
|
I'll review the PR to find potential issues.The user wants to find issues in this PR. Let me look at the actual changes.Here's a focused review of potential issues in PR #1891 – "start hashing conditions content". SummaryAdds a Issues found1. SQL injection / unescaped hash in INSERT (medium)In command =
"INSERT INTO val.calibrations (tid,chash,create_time,create_user) VALUES (" +
std::to_string(tid) + ",'" + ptr->hash() +
"',CURRENT_TIMESTAMP,SESSION_USER) RETURNING cid;";If 2.
|
|
When conditions content is saved, also write a content hash. This allows efficient cat3 online/offline processing. cat3 are tables which are in DbService format and may or may not be modified by the online experts for any given run. A good example is a bad channel list. Since the content may or may not change, when we need to copy the online content offline, we can hash the content and easily look up if an exact copy of the table has already been stored offline. If it has, we use that copy. If the hash doesn't match, then we can create the new content offline.
The dev and prd databases have the new column. It will be ignored by old code, which should continue to work fine. The new code will always commit the hash value, and will be able to look up by hash.