-
Notifications
You must be signed in to change notification settings - Fork 98
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
upload event tracker #605
upload event tracker #605
Conversation
e7f57aa
to
8cfc277
Compare
68f3061
to
c2bd30d
Compare
c2bd30d
to
c8a449d
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #605 +/- ##
==========================================
- Coverage 91.33% 91.13% -0.21%
==========================================
Files 32 32
Lines 4731 4814 +83
==========================================
+ Hits 4321 4387 +66
- Misses 410 427 +17
|
c8a449d
to
11bfcd7
Compare
7f64f28
to
7efc655
Compare
7efc655
to
f0e10b8
Compare
f0e10b8
to
6dfb7e1
Compare
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.
One bad metrics call but otherwise looks good to me as far as concurrency and general correctness goes. I didn't check what the actual requirements here are so didn't review from the point-of-view that this makes sense in general.
pghoard/transfer.py
Outdated
|
||
self._tracked_events[file_key].increments.append(TransferIncrement(total_bytes_uploaded=total_bytes_uploaded)) | ||
|
||
self.metrics.increase(**metric_data) |
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.
Looks like it's possible for metric_data
to be empty dict, should skip the call in that case.
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.
mmm true, tho should it be...? Otherwise we are uploading files that we are not tracking 🤔
d3d2fb1
to
ab97d26
Compare
Tiny comments, otherwise looks reasonable to me. |
Introduces UploadEventProgressTracker thread for monitoring the progress for each individual UploadEvent and logs a warning if an event has no progress for a specified period of time. It helps ensure that file uploads are making progress and do not get stuck.
ab97d26
to
f64ffb5
Compare
About this change - What it does
Introduces
UploadEventProgressTracker
thread for monitoring the progress for each individual UploadEvent and logs a warning if an event has no progress for a specified period of time. It helps ensure that file uploads are makingprogress and do not get stuck.
Resolves: #BF-2157
Why this way
We currently just track the amount of increments, but cannot identify if an upload got stuck.