Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsettled transfer sessions #857

Merged
merged 10 commits into from
Aug 29, 2024
Merged

Unsettled transfer sessions #857

merged 10 commits into from
Aug 29, 2024

Conversation

michaeldjeffrey
Copy link
Contributor

@michaeldjeffrey michaeldjeffrey commented Aug 27, 2024

Proto: helium/proto#415

Settling, but later

When a Data Transfer Session is unable to have it's DC burned immediately, it's considered Pending.

At a later time, settlement for those sessions will be done manually, or by an automated process to be implemented at the time of this writing.

How do we later?

Sessions pending settlement will be written to a pending_data_transfer_sessions table. The table will be used in manual settlement.

Sessions will also be written to a PendingDataTransferSessionV1 report in s3 for auditability.

Check the status of a data transfer session event and store in the
corresponding table
…ttlement

first and last timestamp makes sense for burning because we try and do
that as often as possible.

But for something that may be sitting around for a long time...

A settlement message will come in and try to pick up all sessions within
a window (`recv_timestamp`).

`inserted_at` is for us to help with debugging.
cargo fmt really does not like lots of code inside tokio::select! macros
impl DataTransferSessionReq {
pub fn to_pending_proto(
self,
received_timestamp: DateTime<Utc>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this not be derived from the DataTransferSessionReport or somesuch and just make it a impl From<DataTransferSessionReport> for PendingDataTransferSessionReqV1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably could be. How different Is the DataTransferSessionIngestReportV1.received_timestamp from file_store::FileInfo.timestamp?

@bbalser bbalser merged commit e6adffc into main Aug 29, 2024
17 checks passed
@bbalser bbalser deleted the mj/unsettled-transfer-sessions branch August 29, 2024 01:18
michaeldjeffrey added a commit that referenced this pull request Aug 30, 2024
michaeldjeffrey added a commit that referenced this pull request Aug 30, 2024
* Revert "Unsettled transfer sessions (#857)"

This reverts commit e6adffc.

* update to helium-proto with settlement reversed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants