Page MenuHomePhabricator

[native] Function for triggering file data upload
ClosedPublic

Authored by michal on Jan 15 2024, 6:16 AM.
Tags
None
Referenced Files
F2543488: D10630.diff
Mon, Aug 26, 4:59 AM
Unknown Object (File)
Thu, Aug 22, 12:19 PM
Unknown Object (File)
Thu, Aug 22, 12:14 PM
Unknown Object (File)
Wed, Aug 21, 8:24 AM
Unknown Object (File)
Tue, Aug 6, 10:37 PM
Unknown Object (File)
Tue, Aug 6, 10:25 PM
Unknown Object (File)
Tue, Aug 6, 10:03 PM
Unknown Object (File)
Tue, Aug 6, 10:03 PM
Subscribers

Details

Summary

ENG-6214 : Create a function for signaling a new log/compaction

This a function that the C++ database code will call to specify that a new compaction or log has been saved to a file and needs to be uploaded to the backup service. It uses the Notify struct which allows waiting for an event using notify_object.notified().await; and triggering the event with notify_object.notify_one() (which is non-blocking). It will be used in the backup_data_sender function.

Depends on D10629

Test Plan

Run code:

loop {TRIGGER_BACKUP_FILE_UPLOAD.notified().await; println!("Triggered");}
  1. After each call to notify_one(), "Triggered" is logged
  2. Don't run the loop code. Make sure notify_one() can still be called and doesn't block.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable