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

upload event tracker #604

Closed
wants to merge 1 commit into from
Closed

Conversation

kathia-barahona
Copy link
Contributor

About this change - What it does

Keeps progress of UploadEvents, in case a file gets stuck it should raise a warning

Resolves: #xxxxx

Why this way

Comment on lines +119 to +121
# UploadEvents without file_size are allowed, therefore we cannot determine if the event is completed
if not self.file_size:
return False
Copy link
Contributor Author

Choose a reason for hiding this comment

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

question Not sure why do we allow this though

Comment on lines +167 to +168
if file_key not in self._tracked_events:
raise Exception(f"UploadEvent for {file_key} is not being tracked.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment probably need to raise something like UntrackedUploadEventError, otherwise this will stop the thread

if last_increment_at and (now - last_increment_at) >= avg_rate + self.WARNING_TIMEOUT:
self.log.warning(
"Upload for file %s has been inactive since %s seconds.",
ue_progress.file_size,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment oops should be ue_progress.key instead

@kathia-barahona kathia-barahona deleted the track_wal_file_upload_progress branch October 4, 2023 13:59
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.

1 participant