Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
92626: vendor: fork google storage sdk to cherry-pick fix for chunked upload retry r=rhu713 a=rhu713

Currently google storage v0.80.0 has a bug where the first request of chunked uploads are never retried. Replace this dependency with a fork of v0.80.0 with the fix cherry-picked.

Cherry-picked commit: googleapis/google-api-go-client@2c3e863

Release note: None

92685: changefeedccl: fix cloudstorage doublecount of emitted messages r=samiskin a=samiskin

Resolves cockroachdb#92688

The cloudstorage sink would increase its emitted message count twice per message since there were two calls to Write, one for the message and another for the delimiter.  This change moves the increasing of the count into EmitRow.

Release note (bug fix): Fixed an issue where changefeed.emitted_messages would be increased twice per message for changefeed cloudstorage sinks

92691: ui: add space for header r=maryliag a=maryliag

This commit adds space between header and the top.

Before
<img width="1542" alt="Screen Shot 2022-11-29 at 2 28 19 PM" src="https://user-images.githubusercontent.com/1017486/204645574-8d1b73e0-34a9-44b4-90da-f18fced63076.png">


After
<img width="1537" alt="Screen Shot 2022-11-29 at 3 49 08 PM" src="https://user-images.githubusercontent.com/1017486/204645591-a1b824a0-0253-470e-9e01-d5276ec84243.png">

Epic: None

Release note: None

Co-authored-by: Rui Hu <[email protected]>
Co-authored-by: Shiranka Miskin <[email protected]>
Co-authored-by: maryliag <[email protected]>
  • Loading branch information
4 people committed Nov 30, 2022
4 parents 596c25e + f5ff8f3 + 14436de + 83b94e7 commit 80bfc90
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9260,10 +9260,10 @@ def go_deps():
name = "org_golang_google_api",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/api",
sha256 = "13442f94637aa7d95d31a99dcf144e91d3d71d478ee18b8db7a88e9cf021c558",
strip_prefix = "google.golang.org/[email protected].0",
sha256 = "b3378c579f4f4340403038305907d672c86f615f8233118a8873ebe4229c4f39",
strip_prefix = "github.com/cockroachdb/google-api-go-client@v0.80.1-0.20221117193156-6a9f7150cb93",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/google.golang.org/api/org_golang_google_api-v0.80.0.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/google-api-go-client/com_github_cockroachdb_google_api_go_client-v0.80.1-0.20221117193156-6a9f7150cb93.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/datadriven/com_github_cockroachdb_datadriven-v1.0.1.zip": "0f8fe6199b1c7c44cbd4ce9ac0f3f9e1d2f02263f409361e49445fad4a410ab8",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/errors/com_github_cockroachdb_errors-v1.9.0.zip": "ff3814544271799c80da14dadfe408efc4f66e02cbdf17b73e81614ed9f7ae43",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/go-test-teamcity/com_github_cockroachdb_go_test_teamcity-v0.0.0-20191211140407-cff980ad0a55.zip": "bac30148e525b79d004da84d16453ddd2d5cd20528e9187f1d7dac708335674b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/google-api-go-client/com_github_cockroachdb_google_api_go_client-v0.80.1-0.20221117193156-6a9f7150cb93.zip": "b3378c579f4f4340403038305907d672c86f615f8233118a8873ebe4229c4f39",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20211118104740-dabe8e521a4f.zip": "1972c3f171f118add3fd9e64bcea6cbb9959a3b7fa0ada308e8a7310813fea74",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221116143619-fa0980976952.zip": "32df511a001567e4e45c910bb1c5d0e489a8bc1751aeedb464cda7f0f56c314c",
Expand Down Expand Up @@ -888,7 +889,6 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/gonum.org/v1/gonum/org_gonum_v1_gonum-v0.8.2.zip": "57ecefd9c1ab5a40ed9e37e824597e523e85e78022cd8a4fc5533ff785f49863",
"https://storage.googleapis.com/cockroach-godeps/gomod/gonum.org/v1/netlib/org_gonum_v1_netlib-v0.0.0-20190331212654-76723241ea4e.zip": "ed4dca5026c9ab5410d23bbe21c089433ca58a19bd2902311c6a91791142a687",
"https://storage.googleapis.com/cockroach-godeps/gomod/gonum.org/v1/plot/org_gonum_v1_plot-v0.0.0-20190515093506-e2840ee46a6b.zip": "2d4cadb4bafb5bbfe1f614d7e402c670446fccd154bc4c6b1699e3dffde68ff4",
"https://storage.googleapis.com/cockroach-godeps/gomod/google.golang.org/api/org_golang_google_api-v0.80.0.zip": "13442f94637aa7d95d31a99dcf144e91d3d71d478ee18b8db7a88e9cf021c558",
"https://storage.googleapis.com/cockroach-godeps/gomod/google.golang.org/appengine/org_golang_google_appengine-v1.6.7.zip": "79f80dfac18681788f1414e21a4a7734eff4cdf992070be9163103eb8d9f92cd",
"https://storage.googleapis.com/cockroach-godeps/gomod/google.golang.org/cloud/org_golang_google_cloud-v0.0.0-20151119220103-975617b05ea8.zip": "b1d5595a11b88273665d35d4316edbd4545731c979d046c82844fafef2039c2a",
"https://storage.googleapis.com/cockroach-godeps/gomod/google.golang.org/genproto/org_golang_google_genproto-v0.0.0-20220505152158-f39f71e6c8f3.zip": "8aa446ba7fe5a28d398eceefdad569b604bd4f9c0f86662db0d35fbf61d316cf",
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,5 @@ replace gopkg.in/yaml.v2 => github.com/cockroachdb/yaml v0.0.0-20210825132133-2d
replace github.com/knz/go-libedit => github.com/otan-cockroach/go-libedit v1.10.2-0.20201030151939-7cced08450e7

replace github.com/docker/docker => github.com/moby/moby v20.10.6+incompatible

replace google.golang.org/api v0.80.0 => github.com/cockroachdb/google-api-go-client v0.80.1-0.20221117193156-6a9f7150cb93
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ github.com/cockroachdb/errors v1.9.0 h1:B48dYem5SlAY7iU8AKsgedb4gH6mo+bDkbtLIvM/
github.com/cockroachdb/errors v1.9.0/go.mod h1:vaNcEYYqbIqB5JhKBhFV9CneUqeuEbB2OYJBK4GBNYQ=
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55 h1:YqzBA7tf8Gv8Oz0BbBsPenqkyjiohS7EUIwi7p1QJCU=
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55/go.mod h1:QqVqNIiRhLqJXif5C9wbM4JydBhrAF2WDMxkv5xkyxQ=
github.com/cockroachdb/google-api-go-client v0.80.1-0.20221117193156-6a9f7150cb93 h1:4OctRhiOrTL8zT3udFWOyb2DNIipaGawQudxVt4wcdQ=
github.com/cockroachdb/google-api-go-client v0.80.1-0.20221117193156-6a9f7150cb93/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg=
github.com/cockroachdb/gostdlib v1.13.0/go.mod h1:eXX95p9QDrYwJfJ6AgeN9QnRa/lqqid9LAzWz/l5OgA=
github.com/cockroachdb/gostdlib v1.19.0 h1:cSISxkVnTlWhTkyple/T6NXzOi5659FkhxvUgZv+Eb0=
github.com/cockroachdb/gostdlib v1.19.0/go.mod h1:+dqqpARXbE/gRDEhCak6dm0l14AaTymPZUKMfURjBtY=
Expand Down Expand Up @@ -2858,8 +2860,6 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc
google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw=
google.golang.org/api v0.80.0 h1:IQWaGVCYnsm4MO3hh+WtSXMzMzuyFx/fuR8qkN3A0Qo=
google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/changefeedccl/sink_cloudstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ var _ io.Writer = &cloudStorageSinkFile{}

func (f *cloudStorageSinkFile) Write(p []byte) (int, error) {
f.rawSize += len(p)
f.numMessages++
if f.codec != nil {
return f.codec.Write(p)
}
Expand Down Expand Up @@ -529,6 +528,7 @@ func (s *cloudStorageSink) EmitRow(
if _, err := file.Write(s.rowDelimiter); err != nil {
return err
}
file.numMessages++

if int64(file.buf.Len()) > s.targetMaxFileSize {
s.metrics.recordSizeBasedFlush()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ export const WaitTimeInsightsPanel: React.FC<WaitTimeInsightsPanelProps> = ({
>
<Row gutter={24}>
<Col>
<Heading type="h5">{WaitTimeInsightsLabels.SECTION_HEADING}</Heading>
<Heading type="h5" className={cx("margin-header")}>
{WaitTimeInsightsLabels.SECTION_HEADING}
</Heading>
{showWaitTimeInsightsDetails && (
<Row gutter={24}>
{" "}
Expand Down Expand Up @@ -124,7 +126,7 @@ export const WaitTimeInsightsPanel: React.FC<WaitTimeInsightsPanelProps> = ({
)}
{blockingExecutions.length > 0 && (
<Row>
<Heading type="h5">
<Heading type="h5" className={cx("margin-header")}>
{WaitTimeInsightsLabels.BLOCKING_TXNS_TABLE_TITLE(
executionID,
execType,
Expand All @@ -140,7 +142,7 @@ export const WaitTimeInsightsPanel: React.FC<WaitTimeInsightsPanelProps> = ({
)}
{waitingExecutions.length > 0 && (
<Row>
<Heading type="h5">
<Heading type="h5" className={cx("margin-header")}>
{WaitTimeInsightsLabels.WAITING_TXNS_TABLE_TITLE(
executionID,
execType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,7 @@
.margin-right {
margin-right: 12px !important;
}

.margin-header {
margin-top: 10px;
}
2 changes: 1 addition & 1 deletion vendor

0 comments on commit 80bfc90

Please sign in to comment.