Page MenuHomePhabricator

Implement public method to initialize (generate and persist new) notifications olm account
ClosedPublic

Authored by marcin on Feb 20 2023, 4:55 AM.
Tags
None
Referenced Files
F3112327: D6777.id22881.diff
Thu, Oct 31, 5:10 PM
F3112322: D6777.id23322.diff
Thu, Oct 31, 5:07 PM
Unknown Object (File)
Mon, Oct 28, 3:01 AM
Unknown Object (File)
Sat, Oct 26, 10:55 PM
Unknown Object (File)
Sat, Oct 26, 10:54 PM
Unknown Object (File)
Sat, Oct 26, 10:54 PM
Unknown Object (File)
Sat, Oct 26, 10:54 PM
Unknown Object (File)
Sat, Oct 26, 10:54 PM
Subscribers

Details

Summary

This differential implements public method to initialize (generate if not exists and persist new) notifications olm account. Account generation follows the same semantics as public olm account generation in CommCoreModule. If the account already exists it will ne be re-created.
Atomic and fault-tolerant implementation of private serializeAndFlush method guarantees that if the file exists it is created correctly.

Test Plan

Call this method in CommCoreModule.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-2901
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin published this revision for review.Feb 20 2023, 5:14 AM

Atomic and fault-tolerant implementation of private serializeAndFlush method guarantees that if the file exists it is created correctly.

I'm probably too picky, but could it be replaced in the meantime by any 3rd party?
Besides that, LGTM ;)

Atomic and fault-tolerant implementation of private serializeAndFlush method guarantees that if the file exists it is created correctly.

I'm probably too picky, but could it be replaced in the meantime by any 3rd party?

I am not sure what do you refer to here. Do you mean whether it is possible that 3rd party library will write to this file? Or 3rd party application?

I am not sure what do you refer to here. Do you mean whether it is possible that 3rd party library will write to this file? Or 3rd party application?

Never mind, I meant some malicious code, but my concern is probably out of scope

This revision is now accepted and ready to land.Feb 23 2023, 12:24 AM