Page MenuHomePhabricator

[lib] Delete users for whom identity didnt return a device list for a long time
ClosedPublic

Authored by inka on Oct 17 2024, 4:22 AM.
Tags
None
Referenced Files
F5121410: D13741.id45288.diff
Thu, Apr 3, 10:41 AM
F5120476: D13741.id.diff
Thu, Apr 3, 8:08 AM
F5120151: D13741.id45245.diff
Thu, Apr 3, 6:50 AM
F5119776: D13741.id45295.diff
Thu, Apr 3, 4:39 AM
F5117969: D13741.id45257.diff
Wed, Apr 2, 9:04 PM
Unknown Object (File)
Wed, Apr 2, 9:09 AM
Unknown Object (File)
Feb 28 2025, 6:06 AM
Unknown Object (File)
Feb 28 2025, 5:25 AM
Subscribers

Details

Summary

issue: ENG-9632
If we fail to fetch usres device list for a whole day, we can assume that this is not due to identity temporary data inconsistency. And if a user is a member of a DM, and their device list is not present on the identity, then we know for certain that they deleted their account.
There is only one catch here - if the request times out we shouldn't be deleting the user. Created ENG-9725 to address this

Test Plan

Tested that a user whose device list failed to be fetched for a long time gets deleted and they get removed from threads, users store and aux user store.
Checked that a user whose lastChecked was updated does not get removed from threads and other stores

Diff Detail

Repository
rCOMM Comm
Branch
inka/missing_peers
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Oct 17 2024, 4:40 AM
tomek added inline comments.
lib/shared/dm-ops/dm-op-utils.js
178–202

It might be a good idea to make the dependency between nonDeletedUsers and deletedUsers explicit by creating a function.

This revision is now accepted and ready to land.Oct 21 2024, 3:41 AM