-
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.
99502: sql: add support for re-using lease cache for audit logging r=fqazi a=fqazi Previously, when a query needed to resolve table names for audit we would always take the hit of a KV call. This could be problematic since we could incur extra round trips on multi-region clusters. To address this, this patch will add support for using the lease cache for these looks up and eliminate any extra round trips. Fixes: #99475 Release note (performance improvement): audit logging could incur extra latency when resolving table/view/sequence names. Co-authored-by: Faizan Qazi <[email protected]>
- Loading branch information
Showing
4 changed files
with
32 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2020 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package rttanalysis | ||
|
||
import "testing" | ||
|
||
func BenchmarkAudit(b *testing.B) { reg.Run(b) } | ||
func init() { | ||
reg.Register("Audit", []RoundTripBenchTestCase{ | ||
{ | ||
Name: "select from an audit table", | ||
Setup: `CREATE TABLE audit_table(a INT); | ||
ALTER TABLE audit_table EXPERIMENTAL_AUDIT SET READ WRITE;`, | ||
Stmt: "SELECT * from audit_table", | ||
}, | ||
}) | ||
} |
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