-
Notifications
You must be signed in to change notification settings - Fork 432
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
Improve storage fail detection by putting the object #1549
Conversation
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.
LGTM, let's wait for the context PR to be merged. And the last thing - add a note to the docs about the new setting.
Returned ListFolder check as we discussed. And now our assumption to mix it with context PR become different. Adding ListFolderWithContext is trivial for most of storages except SSH. It is impossible to make it with current SFTP library on the first sight. What do you think? Should we still wait for context PR merge? |
We still have the |
# Conflicts: # internal/config.go
…ObjectWithContext.
# Conflicts: # cmd/pg/wal_fetch.go
Sometimes storage might be alive but work very slow or go to read-only mode. Current fail detector uses ListObject method to check it's liveness. Such check is unreliable.
This PR changes check method to PutObject. Data is pseudo random generated. The object size and the timeout is configurable. Default values are 1MiB and 30s. The object has predefined name always. So there is no additional storage space waste on sequential checks.