This repository was archived by the owner on Mar 4, 2026. It is now read-only.
fix: BulkWriter: apply rate limiter before sending batch - #1451
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1451 +/- ##
==========================================
- Coverage 98.22% 98.21% -0.02%
==========================================
Files 32 32
Lines 19565 19567 +2
Branches 1283 1285 +2
==========================================
Hits 19217 19217
- Misses 344 346 +2
Partials 4 4
Continue to review full report at Codecov.
|
schmidt-sebastian
approved these changes
Mar 16, 2021
| const underRateLimit = this._rateLimiter.tryMakeRequest(batch._opCount); | ||
| if (underRateLimit) { | ||
| await batch.bulkCommit({requestTag: tag}); | ||
| if (flush) this._scheduleCurrentBatch(flush); |
Contributor
There was a problem hiding this comment.
This codeflow still confused me, but I now know why. This sound like it is trying to re-send the same batch again. Should we call this _scheduleNextBatch()? FWIW, I think this function could also just be called _sendBatch() since it takes the batch as an argument now.
Author
There was a problem hiding this comment.
Yeah, that makes more sense. Renamed.
added 2 commits
March 16, 2021 17:55
gcf-owl-bot Bot
added a commit
that referenced
this pull request
Jun 7, 2022
Source-Link: googleapis/synthtool@cd78529 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6
gcf-merge-on-green Bot
pushed a commit
that referenced
this pull request
Jun 7, 2022
) Source-Link: googleapis/synthtool@cd78529 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ddb19a6df6c1fa081bc99fb29658f306dd64668bc26f75d1353b28296f3a78e6
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.