-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
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>, |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
?
This reverts commit e6adffc.
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.