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)
Sun, Apr 28, 9:06 AM
Unknown Object (File)
Sun, Apr 28, 9:05 AM
Unknown Object (File)
Sun, Apr 28, 9:05 AM
Unknown Object (File)
Sun, Apr 28, 9:05 AM
Unknown Object (File)
Sun, Apr 28, 9:05 AM
Unknown Object (File)
Sun, Apr 28, 9:02 AM
Unknown Object (File)
Sun, Apr 28, 8:20 AM
Unknown Object (File)
Sat, Apr 27, 5:20 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
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