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
F1774049: D6777.diff
Thu, May 16, 12:25 AM
Unknown Object (File)
Sat, May 11, 5:21 AM
Unknown Object (File)
Sat, May 11, 5:21 AM
Unknown Object (File)
Sat, May 11, 12:03 AM
Unknown Object (File)
Sat, May 11, 12:03 AM
Unknown Object (File)
Sat, May 11, 12:03 AM
Unknown Object (File)
Sat, May 11, 12:02 AM
Unknown Object (File)
Sun, Apr 28, 9:06 AM
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