Page MenuHomePhabricator

[lib] Use new hashing functions in state check
ClosedPublic

Authored by michal on Sep 29 2023, 5:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 20, 12:46 AM
Unknown Object (File)
Wed, Jul 10, 6:01 PM
Unknown Object (File)
Wed, Jul 10, 4:00 AM
Unknown Object (File)
Fri, Jul 5, 3:55 AM
Unknown Object (File)
Sun, Jun 30, 9:59 PM
Unknown Object (File)
Sun, Jun 30, 7:09 PM
Unknown Object (File)
Sun, Jun 30, 9:39 AM
Unknown Object (File)
Sun, Jun 30, 3:45 AM
Subscribers

Details

Summary

Part of ENG-4959
Depends on D9327

Use the functions introduced in the previous diff. If the hashes are still not available (thread hashes are still being calculated) we just return true because the keyserver will send another state check in 3 minutes anyway.

Test Plan

Set state check time to 20s and remove the version checking added in D9267.

  • check that all whole-store hashes match
  • update a thread and entry names in the keyserver db -> check that they are updated on the client during the next state check, only these specific hashes are wrong
  • Increase the time it takes for integrity-handler to calculate all thread hashes, reload the web page and update a thread name in keyserver db
    • for a few first state checks the thread hashes weren't yet calculated so state check passed
    • after thread hashing completed, the thread got updated on next state check

Also checked that the hashes were correct after thread/entry were updated from state check

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
lib/selectors/socket-selectors.js
37–59 ↗(On Diff #31545)

This is complicated - maybe we should explain a little bit what's going on?

115–116 ↗(On Diff #31545)

Can you add a comment for this?

This revision is now accepted and ready to land.Oct 3 2023, 3:48 AM