-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
110174: Revert "ssmemstorage: improve lock contention on RecordStatement" r=j82w a=j82w This reverts commit a792cd3. Reverting because of a performance regression. Fixes: #110170 110218: kv/bulk: ensure in-flight requests end on batcher reset r=dt a=dt streamingest: ensure batcher is always reset kv/bulk: ensure in-flight requests end on batcher reset Previously if `streamIngestionProcessor.flushBuffer()` had started adding keys to a batcher, it was possible that that batcher had filled and triggered an async flush. Typically this async flush would be awaited when `flushBuffer` explicitly calls `sip.batcher.Flush()` immediately after the loop in which it adds keys. However, if one of the key additions returned an error, one of these async flushes could still be in-flight when that error causes `flushBuffer` to return early, without calling `Flush()` and waiting for it. Thus, `flushBuffer` could return and in doing so finish its local tracing span, that it handed to the batcher and is being used to send its still ongoing async flush, resulting in that request then finding itself using a finished span, which is illegal. The changes here add waiting to inflight requests to `batcher.Reset()`, and then defer the reset of the batcher in `flushBuffer` so that it is always run, including before early returns, ensuring that `flushBuffer` never returns while its batcher has in-flight requests pending. While I'm here: removed the unused error return from `Reset()`. Co-authored-by: j82w <[email protected]> Co-authored-by: David Taylor <[email protected]>
- Loading branch information
Showing
8 changed files
with
103 additions
and
325 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
Oops, something went wrong.