-
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
handle a graceful shutdown on request #594
base: main
Are you sure you want to change the base?
Conversation
# wait for all queues to be emptied | ||
self._wait_for_queue_to_be_emptied(self.compression_queue, "compression") | ||
self._wait_for_queue_to_be_emptied(self.transfer_queue, "transfer") | ||
self._wait_for_queue_to_be_emptied(self.wal_file_deletion_queue, "wal_file_deletion") |
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.
comment wal_file_deletion_queue
is not super high prio, but makes sure we do not re-compress or re-upload files when pghoard is restarted (startup_walk)
2e5b1c6
to
2db19a6
Compare
:/ Build failing, seems rohmu got updated again (using Protocol, not supported on 3.7) |
To be noted that Python 3.7 reached EOL a week ago. |
[BF-1358]
2db19a6
to
b9e7bfb
Compare
About this change - What it does
Handles graceful shutdowns by making sure all compressed files get uploaded
(considers also partial files)Edit: renaming partial files is dangerous, after testing I didn't got the expected results (duplicated segments on different timelines)
Why this way
Shutting down pghoard can be dangerous, leading to missed segments if not all information was uploaded. To avoid this, its better to make sure all tasks/events were completed.