-
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.
116444: sql: atomic flushing of sql stats r=koorosh a=koorosh This change refactors existing logic of flushing SQL stats. The main goal of this change is to fix an issue where flushing and clearing in-memory stats aren't "atomic" operation and may cause cases where not yet persisted stats are cleared unintentionally. Current change introduces following changes: 1. Introduces `PopAllStatementsStats` function that prepares stats to be persisted and then clears in-memory stats as an atomic operation. 2. the process of flushing stats is following: - pop all stats from in-memory storage - reset in-memory stats - use local copy of stats and persist them 3. before this process was like this: - iterate in-memory stats which could be updated during iteration; - persisting stats could take some time and iteration over stats slow; - after flushing all stats, in-memory storage is cleared, but there's no guaranties that at this moment nothing is added to SQL stats. New implementation does have disadvantage, it might cause glitches when we pop stats from in-memory storage and before persisting them - user might not see up to date information. It is assumed that this is better than having missing statistics permanently. Release note: None Resolves: #115168 119723: kvserver: record QPS stats on successful batch request only r=koorosh a=koorosh Before, QPS stats for batch request were recorded before request executed, and it could lead to cases when request failed but calculated QPS is recorded. This behavior looks inconsistent comparing to other replica stats (ie Write Keys, or Write Bytes) that recorded only after successful batch request. This patch changes the order of accounting QPS stats that now recorded after request completes. In addition, it calculates QPS on the final batch request (after possible mutation of it by `maybeStripInFlightWrites` function). Release note: None Related issue: #119388 Related issue: #119206 Epic: None 119763: roachprod: add VM label for "spot" instance r=nameisbhaskar a=nameisbhaskar what was there before: Previously, there was no way to identify spot instances using a label for tracking (billing) why it needed to change: This was inadequate because the VMs can be tracked for billing using the added label what you did about it: To address this, this patch adds a new tag as "spot:true" Fixes: #119629 Epic: none Co-authored-by: Andrii Vorobiov <[email protected]> Co-authored-by: Bhaskarjyoti Bora <[email protected]>
- Loading branch information
Showing
28 changed files
with
656 additions
and
145 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
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.