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
Unknown Object (File)
Fri, Nov 29, 2:44 PM
Unknown Object (File)
Thu, Oct 31, 7:20 PM
Unknown Object (File)
Thu, Oct 31, 5:10 PM
Unknown Object (File)
Thu, Oct 31, 5:07 PM
Unknown Object (File)
Oct 28 2024, 3:01 AM
Unknown Object (File)
Oct 26 2024, 10:55 PM
Unknown Object (File)
Oct 26 2024, 10:54 PM
Unknown Object (File)
Oct 26 2024, 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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