From 2cafaf8d1ef7496561583a0da36ce6c0bf11fb53 Mon Sep 17 00:00:00 2001 From: Andrei Matei Date: Thu, 15 Apr 2021 15:06:43 -0400 Subject: [PATCH 1/2] kvserver: use replica clock for determining stale closed ts Replicas evaluate whether a closed timestamp they find out about is older than they wish. For this, they were using the system time. Most things in CRDB use an hlc.Clock - for example because in tests that one can be stopped. This patch switches the staleness determination to use the hlc. Release note: None --- pkg/kv/kvserver/replica_rangefeed.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/kv/kvserver/replica_rangefeed.go b/pkg/kv/kvserver/replica_rangefeed.go index dccf2309e2ae..55bd4ea6fa75 100644 --- a/pkg/kv/kvserver/replica_rangefeed.go +++ b/pkg/kv/kvserver/replica_rangefeed.go @@ -30,7 +30,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/util/hlc" "github.com/cockroachdb/cockroach/pkg/util/log" "github.com/cockroachdb/cockroach/pkg/util/syncutil" - "github.com/cockroachdb/cockroach/pkg/util/timeutil" "github.com/cockroachdb/cockroach/pkg/util/uuid" "github.com/cockroachdb/errors" ) @@ -611,14 +610,15 @@ func (r *Replica) handleClosedTimestampUpdateRaftMuLocked(ctx context.Context) { // If the closed timestamp is sufficiently stale, signal that we want an // update to the leaseholder so that it will eventually begin to progress // again. + behind := r.Clock().PhysicalTime().Sub(closedTS.GoTime()) slowClosedTSThresh := 5 * closedts.TargetDuration.Get(&r.store.cfg.Settings.SV) - if d := timeutil.Since(closedTS.GoTime()); d > slowClosedTSThresh { + if behind > slowClosedTSThresh { m := r.store.metrics.RangeFeedMetrics if m.RangeFeedSlowClosedTimestampLogN.ShouldLog() { if closedTS.IsEmpty() { log.Infof(ctx, "RangeFeed closed timestamp is empty") } else { - log.Infof(ctx, "RangeFeed closed timestamp %s is behind by %s", closedTS, d) + log.Infof(ctx, "RangeFeed closed timestamp %s is behind by %s", closedTS, behind) } } From f430c4a8071d7287a8af59d9680a578e82dffbbe Mon Sep 17 00:00:00 2001 From: Marylia Gutierrez Date: Mon, 12 Apr 2021 15:40:15 -0400 Subject: [PATCH 2/2] sql: Add Last Execution Timestamp Release note: None --- pkg/roachpb/app_stats.go | 4 + pkg/roachpb/app_stats.pb.go | 227 +++++++++++------- pkg/roachpb/app_stats.proto | 3 + pkg/sql/app_stats.go | 1 + pkg/ui/package.json | 2 +- pkg/ui/src/js/package.json | 2 +- pkg/ui/src/util/appStats.spec.ts | 5 + pkg/ui/src/util/appStats.ts | 4 + .../src/views/statements/statements.spec.tsx | 4 + pkg/ui/yarn-vendor | 2 +- pkg/ui/yarn.lock | 141 ++++++++++- 11 files changed, 290 insertions(+), 105 deletions(-) diff --git a/pkg/roachpb/app_stats.go b/pkg/roachpb/app_stats.go index 3bf87bd9e2ec..2822838b1cd8 100644 --- a/pkg/roachpb/app_stats.go +++ b/pkg/roachpb/app_stats.go @@ -145,6 +145,10 @@ func (s *StatementStatistics) Add(other *StatementStatistics) { s.SensitiveInfo = other.SensitiveInfo } + if s.LastExecTimestamp.Before(other.LastExecTimestamp) { + s.LastExecTimestamp = other.LastExecTimestamp + } + s.Count += other.Count } diff --git a/pkg/roachpb/app_stats.pb.go b/pkg/roachpb/app_stats.pb.go index a70cf74967bc..d35227990b81 100644 --- a/pkg/roachpb/app_stats.pb.go +++ b/pkg/roachpb/app_stats.pb.go @@ -89,6 +89,8 @@ type StatementStatistics struct { ExecStats ExecStats `protobuf:"bytes,21,opt,name=exec_stats,json=execStats" json:"exec_stats"` // SQLType is the type of the sql (DDL, DML, DCL or TCL) SQLType string `protobuf:"bytes,22,opt,name=sql_type,json=sqlType" json:"sql_type"` + // LastExecTimestamp is the last timestamp the statement was executed. + LastExecTimestamp time.Time `protobuf:"bytes,23,opt,name=last_exec_timestamp,json=lastExecTimestamp,stdtime" json:"last_exec_timestamp"` } func (m *StatementStatistics) Reset() { *m = StatementStatistics{} } @@ -561,90 +563,92 @@ func init() { func init() { proto.RegisterFile("roachpb/app_stats.proto", fileDescriptor_81c296505f9d1940) } var fileDescriptor_81c296505f9d1940 = []byte{ - // 1325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x3b, 0x6f, 0x1b, 0x47, - 0x10, 0xd6, 0x89, 0x27, 0xf1, 0x38, 0x7c, 0x88, 0x5e, 0x49, 0xf6, 0x85, 0x10, 0x48, 0x99, 0xb0, - 0x61, 0x39, 0x0f, 0x0a, 0x10, 0xd2, 0x24, 0x81, 0x5f, 0x34, 0x1d, 0x80, 0xb2, 0x6c, 0xc4, 0xa4, - 0xd2, 0xa4, 0x39, 0xac, 0xef, 0x86, 0xf2, 0x41, 0xf7, 0xd2, 0xee, 0x52, 0x26, 0xfb, 0x20, 0xb5, - 0x8b, 0x34, 0xe9, 0xf2, 0x3f, 0x52, 0xa6, 0x71, 0x13, 0xc0, 0xe9, 0x5c, 0x29, 0x89, 0xdc, 0xe4, - 0x17, 0xa4, 0x48, 0x15, 0xec, 0xde, 0x1d, 0x4d, 0xd2, 0x74, 0x72, 0x8e, 0xbb, 0xe3, 0xcc, 0x7c, - 0xdf, 0xee, 0xce, 0x7e, 0x33, 0xb3, 0x84, 0x4b, 0x2c, 0xa4, 0xf6, 0x93, 0xe8, 0xf1, 0x2e, 0x8d, - 0x22, 0x8b, 0x0b, 0x2a, 0x78, 0x2b, 0x62, 0xa1, 0x08, 0x49, 0xd9, 0x0e, 0xed, 0x63, 0xe5, 0x6c, - 0xf1, 0x13, 0xaf, 0xb6, 0x71, 0x14, 0x1e, 0x85, 0xca, 0xb3, 0x2b, 0xbf, 0xe2, 0xa0, 0x5a, 0xe3, - 0x28, 0x0c, 0x8f, 0x3c, 0xdc, 0x55, 0xbf, 0x1e, 0x0f, 0x07, 0xbb, 0xc2, 0xf5, 0x91, 0x0b, 0xea, - 0x47, 0x71, 0x40, 0xf3, 0xd7, 0x3c, 0xac, 0xf7, 0x05, 0x15, 0xe8, 0x63, 0x20,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48, 0xf0, 0x67, 0x90, 0x67, 0xc3, 0x18, 0x6b, 0x64, 0xc4, 0xae, 0xb2, - 0xa1, 0x82, 0xde, 0x81, 0x22, 0x47, 0x76, 0xea, 0xda, 0xf1, 0xc6, 0x0b, 0x19, 0xe1, 0x90, 0x80, - 0x24, 0xc5, 0x5d, 0x28, 0x85, 0xa7, 0xc8, 0x9e, 0x20, 0x75, 0x14, 0x07, 0x64, 0xe4, 0x28, 0xa6, - 0x28, 0x49, 0xd2, 0x85, 0x0a, 0xc7, 0x80, 0xbb, 0xc2, 0x3d, 0x45, 0xcb, 0x0d, 0x06, 0xa1, 0x59, - 0x52, 0x34, 0x5b, 0x73, 0x34, 0xfd, 0x34, 0xa8, 0x1b, 0x0c, 0xc2, 0x54, 0x05, 0x7c, 0xda, 0x48, - 0x6e, 0x01, 0x3c, 0x1e, 0x0b, 0xe4, 0x16, 0x43, 0xea, 0x98, 0x6b, 0x19, 0x77, 0x53, 0x50, 0x98, - 0x1e, 0x52, 0x47, 0x5e, 0xa5, 0xd4, 0x40, 0x8c, 0xaf, 0x66, 0xbd, 0x4a, 0x09, 0x49, 0xe0, 0x80, - 0x23, 0xb4, 0xe3, 0xf2, 0x34, 0x37, 0x15, 0xde, 0x9c, 0xc3, 0xdf, 0x1b, 0xa1, 0x02, 0xf3, 0x74, - 0x75, 0x4c, 0x0d, 0xe4, 0x43, 0x30, 0xf8, 0x89, 0x67, 0x89, 0x71, 0x84, 0xe6, 0x45, 0x25, 0xda, - 0x35, 0x19, 0x72, 0x7e, 0xd6, 0xc8, 0xf7, 0x1f, 0x1d, 0x1c, 0x8e, 0x23, 0xec, 0xe5, 0xf9, 0x89, - 0x27, 0x3f, 0xf6, 0x75, 0xa3, 0x5c, 0xad, 0xec, 0xeb, 0x46, 0xa5, 0xba, 0xb6, 0xaf, 0x1b, 0x17, - 0xaa, 0x64, 0x5f, 0x37, 0x48, 0x75, 0x7d, 0x5f, 0x37, 0xd6, 0xab, 0x1b, 0xfb, 0x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9, 0xb1, 0x3a, 0x5f, 0xfb, 0xfa, 0xf3, 0x3f, 0xea, 0x4b, 0xcf, 0xcf, - 0xeb, 0xda, 0x8b, 0xf3, 0xba, 0xf6, 0xf2, 0xbc, 0xae, 0xfd, 0x7e, 0x5e, 0xd7, 0x9e, 0xbd, 0xaa, - 0x2f, 0xbd, 0x78, 0x55, 0x5f, 0x7a, 0xf9, 0xaa, 0xbe, 0xf4, 0x4d, 0x3e, 0xf9, 0xe3, 0xf6, 0x4f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xcc, 0x85, 0x98, 0xc2, 0x0d, 0x00, 0x00, + // 1349 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xbf, 0x6f, 0x1b, 0xc7, + 0x12, 0xd6, 0x89, 0x27, 0xf1, 0x38, 0x24, 0x25, 0x7a, 0x25, 0xd9, 0xf7, 0x08, 0x81, 0x94, 0x09, + 0x1b, 0x96, 0xdf, 0x7b, 0x91, 0x00, 0x21, 0x4d, 0x12, 0xf8, 0x97, 0x2c, 0x07, 0x90, 0x2c, 0x1b, + 0x31, 0xc9, 0x34, 0x69, 0x0e, 0xeb, 0xbb, 0xa1, 0x7c, 0xd0, 0xfd, 0xd2, 0xee, 0x52, 0x26, 0xfb, + 0x20, 0xb5, 0x8b, 0x34, 0xe9, 0xd2, 0xe5, 0x8f, 0x48, 0x99, 0xc6, 0x4d, 0x00, 0x97, 0xae, 0x94, + 0x44, 0x6e, 0xf2, 0x17, 0xa4, 0x48, 0x15, 0xec, 0xee, 0x1d, 0x4d, 0xd2, 0x74, 0x72, 0x8a, 0xbb, + 0xe3, 0xcc, 0x7c, 0xdf, 0xee, 0xce, 0x7e, 0x33, 0xb3, 0x84, 0x2b, 0x2c, 0xa6, 0xee, 0xb3, 0xe4, + 0xe9, 0x36, 0x4d, 0x12, 0x87, 0x0b, 0x2a, 0xf8, 0x56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 0xf5, 0x6f, 0x63, + 0xac, 0x11, 0x17, 0x83, 0xb4, 0x73, 0xfb, 0xb0, 0x1e, 0xc6, 0x5c, 0x38, 0x0c, 0x5d, 0x8c, 0x84, + 0xa3, 0x5a, 0xa1, 0x87, 0xdc, 0x65, 0x7e, 0x22, 0xe5, 0xa5, 0x94, 0x52, 0xde, 0x69, 0xbd, 0xb3, + 0x87, 0x24, 0xa0, 0x7e, 0xd4, 0x65, 0x88, 0x5f, 0x04, 0x34, 0x7a, 0x1c, 0x7b, 0x98, 0x12, 0xff, + 0x47, 0xb2, 0xb5, 0x15, 0x99, 0xf4, 0xec, 0xbd, 0xa5, 0x22, 0x14, 0xea, 0xef, 0x2c, 0xf5, 0xb6, + 0x74, 0x0a, 0x17, 0x28, 0x9d, 0x2b, 0x93, 0x8b, 0x8c, 0x42, 0x3e, 0x35, 0x7f, 0xff, 0xbe, 0x69, + 0xb4, 0xda, 0x50, 0x1e, 0x4b, 0x32, 0xb1, 0xc1, 0x0c, 0x91, 0x46, 0xea, 0xfc, 0x46, 0xba, 0x4d, + 0x65, 0x21, 0x37, 0xa1, 0xca, 0x4f, 0xfa, 0x94, 0xa1, 0xe7, 0x78, 0x7e, 0xaf, 0xa7, 0xeb, 0x22, + 0x0b, 0xa9, 0xa4, 0xae, 0x3d, 0xe9, 0x69, 0x7d, 0x33, 0x0f, 0x97, 0x67, 0x0c, 0xe8, 0x87, 0x38, + 0x94, 0x75, 0x77, 0xd2, 0x47, 0x36, 0x9c, 0x48, 0xb0, 0x36, 0x91, 0xcb, 0x50, 0xa0, 0x49, 0xa2, + 0x78, 0x33, 0x8f, 0x34, 0x90, 0x06, 0x14, 0x3d, 0x9f, 0x8b, 0xce, 0x93, 0x43, 0x75, 0x70, 0x2b, + 0xbb, 0x96, 0xd4, 0x48, 0xd6, 0x61, 0xb1, 0x47, 0xfd, 0x00, 0x3d, 0x55, 0x46, 0x99, 0x3b, 0xb5, + 0x49, 0xd6, 0x38, 0xd1, 0x05, 0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0xa8, 0xca, 0x77, 0x40, 0x88, 0xa1, 0xd3, 0xe7, 0xf4, 0x08, 0x73, 0x4f, 0x79, 0xf9, + 0x7c, 0x78, 0x84, 0xe1, 0x97, 0x12, 0x44, 0xf6, 0x65, 0x4a, 0x22, 0x81, 0x91, 0x14, 0xa9, 0xca, + 0x6e, 0xee, 0x69, 0xbf, 0xf4, 0x16, 0x28, 0x13, 0x4c, 0x1e, 0x42, 0x2d, 0x3b, 0x57, 0x88, 0x5c, + 0xb2, 0xe7, 0xff, 0x0b, 0xb0, 0x9c, 0x22, 0x1f, 0xa5, 0x40, 0xf2, 0x39, 0x2c, 0xc9, 0xd3, 0x79, + 0x3e, 0x3f, 0x4e, 0x8f, 0x97, 0xf7, 0x0d, 0x50, 0x09, 0xe9, 0x60, 0xcf, 0xe7, 0xc7, 0xea, 0x7c, + 0xbb, 0x37, 0x5f, 0xfe, 0xd6, 0x98, 0x7b, 0x79, 0xde, 0x30, 0x5e, 0x9d, 0x37, 0x8c, 0xd7, 0xe7, + 0x0d, 0xe3, 0xd7, 0xf3, 0x86, 0xf1, 0xe2, 0x4d, 0x63, 0xee, 0xd5, 0x9b, 0xc6, 0xdc, 0xeb, 0x37, + 0x8d, 0xb9, 0xaf, 0x8a, 0xe9, 0xdf, 0xc1, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x04, 0xf1, 0x3a, + 0x34, 0x18, 0x0e, 0x00, 0x00, } func (this *SensitiveInfo) Equal(that interface{}) bool { @@ -764,6 +768,16 @@ func (m *StatementStatistics) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastExecTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastExecTimestamp):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintAppStats(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba i -= len(m.SQLType) copy(dAtA[i:], m.SQLType) i = encodeVarintAppStats(dAtA, i, uint64(len(m.SQLType))) @@ -1016,12 +1030,12 @@ func (m *SensitiveInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.MostRecentPlanTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.MostRecentPlanTimestamp):]) - if err18 != nil { - return 0, err18 + n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.MostRecentPlanTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.MostRecentPlanTimestamp):]) + if err19 != nil { + return 0, err19 } - i -= n18 - i = encodeVarintAppStats(dAtA, i, uint64(n18)) + i -= n19 + i = encodeVarintAppStats(dAtA, i, uint64(n19)) i-- dAtA[i] = 0x1a { @@ -1498,6 +1512,8 @@ func (m *StatementStatistics) Size() (n int) { n += 2 + l + sovAppStats(uint64(l)) l = len(m.SQLType) n += 2 + l + sovAppStats(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastExecTimestamp) + n += 2 + l + sovAppStats(uint64(l)) return n } @@ -2191,6 +2207,39 @@ func (m *StatementStatistics) Unmarshal(dAtA []byte) error { } m.SQLType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastExecTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAppStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAppStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAppStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastExecTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAppStats(dAtA[iNdEx:]) diff --git a/pkg/roachpb/app_stats.proto b/pkg/roachpb/app_stats.proto index d7068733600e..ad4d90d83fd0 100644 --- a/pkg/roachpb/app_stats.proto +++ b/pkg/roachpb/app_stats.proto @@ -94,6 +94,9 @@ message StatementStatistics { // SQLType is the type of the sql (DDL, DML, DCL or TCL) optional string sql_type = 22 [(gogoproto.nullable) = false, (gogoproto.customname) = "SQLType"]; + // LastExecTimestamp is the last timestamp the statement was executed. + optional google.protobuf.Timestamp last_exec_timestamp = 23 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // Note: be sure to update `sql/app_stats.go` when adding/removing fields here! reserved 13, 14, 17, 18, 19, 20; diff --git a/pkg/sql/app_stats.go b/pkg/sql/app_stats.go index 52053be84c5d..176608395870 100644 --- a/pkg/sql/app_stats.go +++ b/pkg/sql/app_stats.go @@ -244,6 +244,7 @@ func (a *appStats) recordStatement( s.mu.data.OverheadLat.Record(s.mu.data.Count, ovhLat) s.mu.data.BytesRead.Record(s.mu.data.Count, float64(stats.bytesRead)) s.mu.data.RowsRead.Record(s.mu.data.Count, float64(stats.rowsRead)) + s.mu.data.LastExecTimestamp = timeutil.Now() // Note that some fields derived from tracing statements (such as // BytesSentOverNetwork) are not updated here because they are collected // on-demand. diff --git a/pkg/ui/package.json b/pkg/ui/package.json index 59955fe666bc..48f130126610 100644 --- a/pkg/ui/package.json +++ b/pkg/ui/package.json @@ -15,7 +15,7 @@ "cypress:update-snapshots": "yarn cypress run --env updateSnapshots=true --spec 'cypress/integration/**/*.visual.spec.ts'" }, "dependencies": { - "@cockroachlabs/cluster-ui": "^0.2.28", + "@cockroachlabs/cluster-ui": "^0.2.30", "analytics-node": "^3.5.0", "antd": "^3.25.2", "babel-polyfill": "^6.26.0", diff --git a/pkg/ui/src/js/package.json b/pkg/ui/src/js/package.json index abb7d68cdc33..d1853e8e090e 100644 --- a/pkg/ui/src/js/package.json +++ b/pkg/ui/src/js/package.json @@ -1,6 +1,6 @@ { "name": "@cockroachlabs/crdb-protobuf-client", - "version": "0.0.9", + "version": "0.0.10", "description": "Javascript client for use by CockroachDB UI", "main": "./protos.js", "types": "./protos.d.ts", diff --git a/pkg/ui/src/util/appStats.spec.ts b/pkg/ui/src/util/appStats.spec.ts index 30328d1af83f..622ca276e858 100644 --- a/pkg/ui/src/util/appStats.spec.ts +++ b/pkg/ui/src/util/appStats.spec.ts @@ -179,6 +179,11 @@ function randomStats(sensitiveInfo?: ISensitiveInfo): StatementStatistics { rows_read: randomStat(), sensitive_info: sensitiveInfo || makeSensitiveInfo(null, null), exec_stats: randomExecStats(), + sql_type: "DDL", + last_exec_timestamp: { + seconds: Long.fromInt(1599670292), + nanos: 111613000, + }, }; } diff --git a/pkg/ui/src/util/appStats.ts b/pkg/ui/src/util/appStats.ts index cd8b8fe91e67..5f2fffcde41a 100644 --- a/pkg/ui/src/util/appStats.ts +++ b/pkg/ui/src/util/appStats.ts @@ -86,6 +86,10 @@ export function addStatementStats( legacy_last_err_redacted: "", exec_stats: addExecStats(a.exec_stats, b.exec_stats), sql_type: a.sql_type, + last_exec_timestamp: + a.last_exec_timestamp.seconds > b.last_exec_timestamp.seconds + ? a.last_exec_timestamp + : b.last_exec_timestamp, }; } diff --git a/pkg/ui/src/views/statements/statements.spec.tsx b/pkg/ui/src/views/statements/statements.spec.tsx index 86c0faeee7b8..90bcff56042f 100644 --- a/pkg/ui/src/views/statements/statements.spec.tsx +++ b/pkg/ui/src/views/statements/statements.spec.tsx @@ -498,6 +498,10 @@ function makeStats(): Required { bytes_read: makeStat(), exec_stats: makeExecStats(), sql_type: "DDL", + last_exec_timestamp: { + seconds: Long.fromInt(1599670292), + nanos: 111613000, + }, }; } diff --git a/pkg/ui/yarn-vendor b/pkg/ui/yarn-vendor index c276e8479317..e2d632216ff9 160000 --- a/pkg/ui/yarn-vendor +++ b/pkg/ui/yarn-vendor @@ -1 +1 @@ -Subproject commit c276e8479317c8fe63cd6ba5f14cc77efb80fe59 +Subproject commit e2d632216ff9cf5f4d9136a4b3acf137fb914c80 diff --git a/pkg/ui/yarn.lock b/pkg/ui/yarn.lock index 3d9a12b587ef..6f681ca6deda 100644 --- a/pkg/ui/yarn.lock +++ b/pkg/ui/yarn.lock @@ -1717,7 +1717,7 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/runtime@^7.12.13": +"@babel/runtime@^7.12.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.8.7": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== @@ -1813,13 +1813,13 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@cockroachlabs/cluster-ui@^0.2.28": - version "0.2.28" - resolved "https://registry.yarnpkg.com/@cockroachlabs/cluster-ui/-/cluster-ui-0.2.28.tgz#9d4a6467e4abdfb13911f7fc73935dae7a5b188b" - integrity sha512-Yog17595qSxgXeGG7ykpaiXs0JTEhfbdrzI+CNXSub20gi4g2qI8FQ0ksKiSI9k2HoNI2fWBj3c/xkJ9brgCHA== +"@cockroachlabs/cluster-ui@^0.2.30": + version "0.2.30" + resolved "https://registry.yarnpkg.com/@cockroachlabs/cluster-ui/-/cluster-ui-0.2.30.tgz#2a2f96e2be242a08f3c24c9867489c0f4b3d1bb9" + integrity sha512-xf/TEGyUYS/U7CLJxDCgPg4BLeH1oKvpVinAk1FmwULSohVKfPAApKSJ9/jjPuutQ2ESJRSZdAblxUegYWYB9A== dependencies: "@babel/runtime" "^7.12.13" - "@cockroachlabs/crdb-protobuf-client" "^0.0.8" + "@cockroachlabs/crdb-protobuf-client" "^0.0.10-beta.0" "@cockroachlabs/icons" "0.3.0" "@cockroachlabs/ui-components" "0.2.14-alpha.0" "@popperjs/core" "^2.4.0" @@ -1833,13 +1833,13 @@ npm-run-all "^4.1.5" react-helmet "^5.2.0" react-popper "^2.2.3" - react-select "^1.2.1" + react-select "^4.3.0" reselect "^4.0.0" -"@cockroachlabs/crdb-protobuf-client@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@cockroachlabs/crdb-protobuf-client/-/crdb-protobuf-client-0.0.8.tgz#064f44664091dd23e18167c67cf1713ff7845470" - integrity sha512-JP6miYNX8FvFSTSZ51etCfyxO/mi/TVVyeVIFsnN/CTlbHI6QZODHJIS1OSPvzfBnfXgFwcb1tQmMrK0L9xFEA== +"@cockroachlabs/crdb-protobuf-client@^0.0.10-beta.0": + version "0.0.10-beta.0" + resolved "https://registry.yarnpkg.com/@cockroachlabs/crdb-protobuf-client/-/crdb-protobuf-client-0.0.10-beta.0.tgz#b1bb2283379d8cf9d75adf780ff19374b4485e65" + integrity sha512-FQ29hZTM7CnunHWG88a5pgWXYGy/aAFrW0tn0E0t++QG7BTGkDVEuPdPcoMSCEUcKbFpzYc7AaY050JnU27rAA== "@cockroachlabs/eslint-config@^0.1.11": version "0.1.11" @@ -1873,6 +1873,17 @@ "@emotion/utils" "0.11.3" "@emotion/weak-memoize" "0.2.5" +"@emotion/cache@^11.0.0", "@emotion/cache@^11.1.3": + version "11.1.3" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.1.3.tgz#c7683a9484bcd38d5562f2b9947873cf66829afd" + integrity sha512-n4OWinUPJVaP6fXxWZD9OUeQ0lY7DvtmtSuqtRWT0Ofo/sBLCVSgb4/Oa0Q5eFxcwablRKjUXqXtNZVyEwCAuA== + dependencies: + "@emotion/memoize" "^0.7.4" + "@emotion/sheet" "^1.0.0" + "@emotion/utils" "^1.0.0" + "@emotion/weak-memoize" "^0.2.5" + stylis "^4.0.3" + "@emotion/core@^10.0.7": version "10.0.27" resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.27.tgz#7c3f78be681ab2273f3bf11ca3e2edc4a9dd1fdc" @@ -1899,6 +1910,11 @@ resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.4.tgz#f14932887422c9056b15a8d222a9074a7dfa2831" integrity sha512-fxfMSBMX3tlIbKUdtGKxqB1fyrH6gVrX39Gsv3y8lRYKUqlgDt3UMqQyGnR1bQMa2B8aGnhLZokZgg8vT0Le+A== +"@emotion/hash@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" + integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== + "@emotion/is-prop-valid@0.8.6": version "0.8.6" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.6.tgz#4757646f0a58e9dec614c47c838e7147d88c263c" @@ -1911,6 +1927,24 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== +"@emotion/memoize@^0.7.4": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" + integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== + +"@emotion/react@^11.1.1": + version "11.1.5" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.1.5.tgz#15e78f9822894cdc296e6f4e0688bac8120dfe66" + integrity sha512-xfnZ9NJEv9SU9K2sxXM06lzjK245xSeHRpUh67eARBm3PBHjjKIZlfWZ7UQvD0Obvw6ZKjlC79uHrlzFYpOB/Q== + dependencies: + "@babel/runtime" "^7.7.2" + "@emotion/cache" "^11.1.3" + "@emotion/serialize" "^1.0.0" + "@emotion/sheet" "^1.0.1" + "@emotion/utils" "^1.0.0" + "@emotion/weak-memoize" "^0.2.5" + hoist-non-react-statics "^3.3.1" + "@emotion/serialize@^0.11.15": version "0.11.15" resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.15.tgz#9a0f5873fb458d87d4f23e034413c12ed60a705a" @@ -1922,11 +1956,27 @@ "@emotion/utils" "0.11.3" csstype "^2.5.7" +"@emotion/serialize@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.2.tgz#77cb21a0571c9f68eb66087754a65fa97bfcd965" + integrity sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A== + dependencies: + "@emotion/hash" "^0.8.0" + "@emotion/memoize" "^0.7.4" + "@emotion/unitless" "^0.7.5" + "@emotion/utils" "^1.0.0" + csstype "^3.0.2" + "@emotion/sheet@0.9.4": version "0.9.4" resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== +"@emotion/sheet@^1.0.0", "@emotion/sheet@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.0.1.tgz#245f54abb02dfd82326e28689f34c27aa9b2a698" + integrity sha512-GbIvVMe4U+Zc+929N1V7nW6YYJtidj31lidSmdYcWozwoBIObXBnaJkKNDjZrLm9Nc0BR+ZyHNaRZxqNZbof5g== + "@emotion/styled-base@^10.0.27": version "10.0.27" resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-10.0.27.tgz#d9efa307ae4e938fcc4d0596b40b7e8bc10f7c7c" @@ -1950,7 +2000,7 @@ resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@0.7.5": +"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.5": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== @@ -1960,7 +2010,12 @@ resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== -"@emotion/weak-memoize@0.2.5": +"@emotion/utils@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.0.0.tgz#abe06a83160b10570816c913990245813a2fd6af" + integrity sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA== + +"@emotion/weak-memoize@0.2.5", "@emotion/weak-memoize@^0.2.5": version "0.2.5" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== @@ -5298,6 +5353,11 @@ csstype@^2.2.0, csstype@^2.5.7: resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.8.tgz#0fb6fc2417ffd2816a418c9336da74d7f07db431" integrity sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA== +csstype@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.7.tgz#2a5fb75e1015e84dd15692f71e89a1450290950b" + integrity sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g== + custom-event@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" @@ -5697,6 +5757,14 @@ dom-converter@^0.2: dependencies: utila "~0.4" +dom-helpers@^5.0.1: + version "5.2.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.0.tgz#57fd054c5f8f34c52a3eeffdb7e7e93cd357d95b" + integrity sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ== + dependencies: + "@babel/runtime" "^7.8.7" + csstype "^3.0.2" + dom-matches@>=1.0.1: version "2.0.0" resolved "https://registry.yarnpkg.com/dom-matches/-/dom-matches-2.0.0.tgz#d2728b416a87533980eb089b848d253cf23a758c" @@ -7546,6 +7614,13 @@ hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: dependencies: react-is "^16.7.0" +hoist-non-react-statics@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -9015,6 +9090,11 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memoize-one@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== + memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -11411,6 +11491,13 @@ react-input-autosize@^2.1.2: dependencies: prop-types "^15.5.8" +react-input-autosize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-3.0.0.tgz#6b5898c790d4478d69420b55441fcc31d5c50a85" + integrity sha512-nL9uS7jEs/zu8sqwFE5MAPx6pPkNAriACQ2rGLlqmKr2sPGtN7TXTyDdQt4lbNXVx7Uzadb40x8qotIuru6Rhg== + dependencies: + prop-types "^15.5.8" + react-inspector@^2.3.0, react-inspector@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-2.3.1.tgz#f0eb7f520669b545b441af9d38ec6d706e5f649c" @@ -11556,6 +11643,19 @@ react-select@^1.2.1: prop-types "^15.5.8" react-input-autosize "^2.1.2" +react-select@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-4.3.0.tgz#6bde634ae7a378b49f3833c85c126f533483fa2e" + integrity sha512-SBPD1a3TJqE9zoI/jfOLCAoLr/neluaeokjOixr3zZ1vHezkom8K0A9J4QG9IWDqIDE9K/Mv+0y1GjidC2PDtQ== + dependencies: + "@babel/runtime" "^7.12.0" + "@emotion/cache" "^11.0.0" + "@emotion/react" "^11.1.1" + memoize-one "^5.0.0" + prop-types "^15.6.0" + react-input-autosize "^3.0.0" + react-transition-group "^4.3.0" + react-side-effect@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.5.tgz#f26059e50ed9c626d91d661b9f3c8bb38cd0ff2d" @@ -11602,6 +11702,16 @@ react-textarea-autosize@^7.0.4: "@babel/runtime" "^7.1.2" prop-types "^15.6.0" +react-transition-group@^4.3.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" + integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react@^0.14.0: version "0.14.9" resolved "https://registry.yarnpkg.com/react/-/react-0.14.9.tgz#9110a6497c49d44ba1c0edd317aec29c2e0d91d1" @@ -13079,6 +13189,11 @@ stylint@^1.5.9: user-home "2.0.0" yargs "4.7.1" +stylis@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.0.10.tgz#446512d1097197ab3f02fb3c258358c3f7a14240" + integrity sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg== + stylus-loader@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6"