This repository has been archived by the owner on Feb 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve the throttle threshold when syncing
Currently, the new threshold is calculated when fetching the result from result queue and is applied to the next reserve/fetch result. However, the result processing may take too much time when data is large, the threshold is not updated early enough to slow down further reserve/fetch. As a result, the memory can peak so high. In this commit, we re-calculate threshold when handling response. In case the result queue is throttled, we discard the response and queue the fetch task back to queue for later re-fetch. This may increase the cost in network bandwidth but help to regulate the memory usage.
- Loading branch information
Showing
4 changed files
with
90 additions
and
70 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