forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor object store operation timeout code (openzfs#837)
There are only a few operations that use the caller-visible timeout `OAError::TimeoutError`: * The PoolOwnerPhys, during try_claim(). Timeout is <2s. * PoolPhys::create(), during pool creation. Timeout is 30s. * The HeartbeatPhys, during start_heartbeat(). Timeout is 10s. * create_object_test(), during test_connectivity. Timeout is 30s. This commit simplifies the timeout code by: * Always applying the PER_OPERATION_TIMEOUT (2s), which is retried transparently and indefinitely. * Optionally applying a user-visible timeout only to put_object_timeout(). There's a slight change in behavior which is that when the caller's timeout is >2s, their request may now be timed out and retried after 2s, whereas before we would wait until the caller-specified timeout (up to 30s) and then fail. This allows reducing the None arguments that are passed in many places, as well as the tricky `xor` logic in the retry code.
- Loading branch information
Showing
6 changed files
with
40 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters