forked from MystenLabs/sui
-
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.
[QD Reconfig] 1. Refactor Quorum Driver (MystenLabs#6988)
This PR refactors Quorum Driver (QD). The changes include: 1. `QuorumDriver(Handler)` becomes an active process to constantly dequeue `QuorumDriverTask` to execute. 2. `QuorumDriverTask` is enqueued by the producer, e.g. TransactionOrchestrator (TO), or other clients where QD is embedded. 3. QD has a notifier (`NotifyRead`). When submitting a transaction (`fn submit_transaction`), a ticker is returned to the callsite which can be awaited. In TO, this is a bit different - TO has access to the notifier, so before it submits the transaction, it already registers the ticket, then it calls `fn submit_transaction_no_ticket` to save a new ticket's overhead. 4. When a client (e.g. a dapp) submits a transaction multiple times simultaneously, only one `QuorumDriverTask` will be enqueued into QD, although every request will be given a ticket for notification. 5. Transaction Failures: Failures are categorized into retryable failures and unretryable failures. Retryable failures are those caused by transient errors (usually happens between fullnode/QD and validators) such as network partition or reconfiguration and could succeed after the transient errors go away. Non-retryable failures usually mean the transaction is badly constructed, for example, using the wrong object version, insufficient gas balance etc. 6. Retry: For transient retryable failures, QD keeps retrying them until it succeeds or surpasses maximal retry times (it's 10 in TO meaning the total attempt times is 11 for one transaction). Retry is executed in exponential back-off interval ( `200ms * 2^retry_times` so a transaction times out ~3.5 minutes) 7. This PR does not make a very thorough categorization for every possible error in the write path, which we will do in subsequent code changes 8. Note this PR breaks the reconfigurability of load gen, because the epoch transition error is now invisible to clients. In subsequent PRs, we will add relevant things like `ReconfigObserver` to make it work again.
- Loading branch information
Showing
15 changed files
with
959 additions
and
607 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
Oops, something went wrong.