Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
121366: pkg/ui: properly derive XScale in statement details page r=nkodali a=abarganier

Fixes: #121362

Epic: none

#118680 introduced code to align the timeseries charts on the statement details page to the time range set by the time picker, instead of the time range that we had available data for.

The code contained a bug where it would set the start & end of the XScale to `Moment.prototype.valueOf` instead of the result of *calling* `Moment.prototype.valueOf()`. This causes the start & end timestamps to be set to functions, instead of unix timestamps, which broke the charts.

This PR simply invokes the function.

Release note (bug fix): The timeseries graphs shown on the SQL Activity statement details page in DB Console will now render properly, after fixing a bug related to setting the time range of the charts.


121372: backupccl: plumb approximate file size in restore_span_covering r=dt a=msbutler

Epic: none

Release note: none

Co-authored-by: Alex Barganier <abarganier@cockroachlabs.com>
Co-authored-by: Michael Butler <butler@cockroachlabs.com>
  • Loading branch information
3 people committed Mar 29, 2024
3 parents 24d64f5 + 6244f12 + a44335b commit eb69d29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions pkg/ccl/backupccl/restore_span_covering.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,12 @@ func generateAndSendImportSpans(
for layer := range covFilesByLayer {
for _, f := range covFilesByLayer[layer] {
fileSpec := execinfrapb.RestoreFileSpec{
Path: f.Path,
Dir: backups[layer].Dir,
BackupFileEntrySpan: f.Span,
BackupFileEntryCounts: f.EntryCounts,
BackingFileSize: f.BackingFileSize,
Path: f.Path,
Dir: backups[layer].Dir,
BackupFileEntrySpan: f.Span,
BackupFileEntryCounts: f.EntryCounts,
BackingFileSize: f.BackingFileSize,
ApproximatePhysicalSize: f.ApproximatePhysicalSize,
}
if dir, ok := backupLocalityMap[layer][f.LocalityKV]; ok {
fileSpec.Dir = dir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ export class StatementDetails extends React.Component<
const duration = (v: number) => Duration(v * 1e9);
const [chartsStart, chartsEnd] = toRoundedDateRange(this.props.timeScale);
const xScale = {
graphTsStartMillis: chartsStart.valueOf,
graphTsEndMillis: chartsEnd.valueOf,
} as unknown as XScale;
graphTsStartMillis: chartsStart.valueOf(),
graphTsEndMillis: chartsEnd.valueOf(),
} as XScale;

return (
<>
Expand Down

0 comments on commit eb69d29

Please sign in to comment.