Page MenuHomePhabricator

[sqlite] Fix corrupted creation_time timestamps in threads
Changes PlannedPublicDraft

Authored by angelika on Tue, Dec 17, 5:29 PM.

Details

Reviewers
kamil
tomek
Summary

https://linear.app/comm/issue/ENG-9955/threadstore-timestamp-corruption-issue

I guess this line was supposed to insert the current time, but it doesn't work. It turns out time is a function
(https://en.cppreference.com/w/c/chrono/time) so it reinterpret_casts a pointer to the time function as a
creation date. So that's why I was seeing weird timestamps like 6637613460 and often the same for each thread.

Test Plan

The most sure way to reproduce the bug (works 100% of the time):
Create a new account (but maybe you don't have to do this)
Restart the app (so we save to sqlite db and read from it again)
See the threads creation dates in the store. Before the fix they were corrupted, after the fix they're ok.

Diff Detail

Repository
rCOMM Comm
Branch
graszka22/ENG-9955
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Tue, Dec 17, 5:39 PM
Harbormaster failed remote builds in B33170: Diff 46561!