HomePhabricator
Diffusion Comm 4d1d473b8441

Implement read-and-flush operation for flat-file based message storage

Description

Implement read-and-flush operation for flat-file based message storage

Summary: Implements operation that reads all messages that were written since last call to this method, and clears main storage content if semaphore acquisition succeded. It also reads and deletes all random files with single notifications.

Test Plan: Use this method in AppDelegate to read messages written by NotificationService (see test plan for parent diff). Ensure all messages sent via web client are seen in the debugger where AppDelegate calls this method. Once it is done. Launch debugger again (but do not send any notifications). Ensure that no messages are seen this time (this checks for successful flush operation).

Reviewers: palys-swm, varun, karol-bisztyga

Reviewed By: palys-swm

Subscribers: ashoat, Adrian, atul, yayabosh

Differential Revision: https://phab.comm.dev/D4394

Details

Provenance
marcinAuthored on Jul 7 2022, 5:16 AM
Reviewer
tomek
Differential Revision
D4394: Implement read-and-flush operation for flat-file based message storage
Parents
rCOMM33c0e99924a8: Implement write operation for flat-file based message storage
Branches
Unknown
Tags
Unknown