Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Slack sync upstream 2018 05 06#89

Merged
demmer merged 67 commits intomasterfrom
slack-sync-upstream-2018-05-06
May 7, 2018
Merged

Slack sync upstream 2018 05 06#89
demmer merged 67 commits intomasterfrom
slack-sync-upstream-2018-05-06

Conversation

@demmer
Copy link
Copy Markdown
Collaborator

@demmer demmer commented May 6, 2018

Sync with latest upstream as of 2454a7d.

Notable relevant changes include:

Geoff Flarity and others added 30 commits March 26, 2018 11:52
Signed-off-by: Geoff Flarity <geoff@squareup.com>
Signed-off-by: Harrison McGonigal <hmcgonigal@hubspot.com>
Signed-off-by: tpetr <tpetr@hubspot.com>
The idea is so another commands can reuse the initTabletMap.

In my case, I am building a new command and importing libs from vitess. In my cmd I am
faking a topology(using memory) and starting vttablets for it. Similar on what vtcombo
does.

Signed-off-by: Arthur Neves <arthurnn@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Arthur Neves <arthurnn@gmail.com>
Signed-off-by: Arthur Neves <arthurnn@gmail.com>
Signed-off-by: Arthur Neves <arthurnn@gmail.com>
… it when fixing replication on the old master.

Signed-off-by: Harrison McGonigal <hmcgonigal@hubspot.com>
The alias was "glog" as well and therefore redundant.

Signed-off-by: Michael Berlin <mberlin@google.com>
vt/log: Do not use an alias when importing the "glog" package.
To help debugging whether or not the comment was parsed properly, include
the boolean for MultiShardAutocommit in the plan JSON.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Signed-off-by: Michael Pawliszyn <mpawliszyn@gmail.com>
Signed-off-by: Michael Berlin <mberlin@google.com>
It is only used for tests in the same package.

Signed-off-by: Michael Berlin <mberlin@google.com>
This way we avoid that a partial match would be a success as well.

Signed-off-by: Michael Berlin <mberlin@google.com>
…-urls

Adds the possibility to vary the template of tablet debug urls.
Add JD.com to the list of adopters
Move Duration* types into duration.go.

This is a mere move of code and no change in functionality.

By splitting out the code, I hope it will be easier to maintain it.

Signed-off-by: Michael Berlin <mberlin@google.com>
vitessio#3784 introduced two layers of code for "stats.Counter" (and the new type "stats.Gauge").

As a consequence, it was for example possible to create a "stats.Gauge" for a time.Duration value.

This approach did not work well with our internal usage of the stats package.

Therefore, I reversed this and simplified the code:

- MetricFunc() interface was removed. Instead, a CountFunc or a GaugeFunc requires a simple func() int64 as input.
- IntFunc() removed. Before vitessio#3784, it was used to implement the expvar.Var interface. But now, this is taken care of by the types itself e.g "stats.CounterFunc". Therefore, we do not need it anymore and users of the "stats" package can just pass a plain func() int64.
- Added types "Duration" and "DurationFunc" back.
- Added "Variable" interface. This allowed to simplify the Prometheus code which depends on the Help() method for each stats variable.
- Prometheus: Conversion to float64 values is now done in prometheusbackend.go and removed from the stats package.

BUG=78571948

Signed-off-by: Michael Berlin <mberlin@google.com>
… t2 AS a2 WHERE a1.id=a2.id;

related issue:
vitessio#3787

Signed-off-by: xhh1989 <xuhaihua1989@gmail.com>
Signed-off-by: Michael Berlin <mberlin@google.com>
…ests.

"gotname" and "gotv" type should always be checked first.

Signed-off-by: Michael Berlin <mberlin@google.com>
So far, the pool wait time is the only metric in our code base which requires a counter duration.

All other metrics are just exposures of a duration configuration parameter.

Signed-off-by: Michael Berlin <mberlin@google.com>
It should read as follows now:

- counters - single label
- counters - single label (function)
- counters - multiple labels
- counters - multiple labels (function)

and then the same thing for gauges as well.

This commit did not change any functionality.

Signed-off-by: Michael Berlin <mberlin@google.com>
The new name is more consistent with the *WithMultiLabels counterparts.

Signed-off-by: Michael Berlin <mberlin@google.com>
…ore consistent with the *WithMultiLabels counterparts.

Signed-off-by: Michael Berlin <mberlin@google.com>
Now the function signatures are consistent with all other constructors.

Other changes:
- Do not repeat the type in function signatures when it's the same.
- Do not use receiver names with more than 2 letters.
- Do not use pointer receiver if you don't want to modify the object.

Signed-off-by: Michael Berlin <mberlin@google.com>
Signed-off-by: Michael Berlin <mberlin@google.com>
Signed-off-by: jvaidya <jitendra.vaidya@gmail.com>
demmer and others added 28 commits April 30, 2018 17:06
When troubleshooting some production issues, we noticed the slow
query killer running on a couple of connections and around the same
time ran into some "broken pipe" errors on the local unix socket.

While it seems likely that the query killer caused the broken pipe
errors, including the connection ID in both logs would help to
identify this more reliably.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
As suggested in PR review this brings Timings in line with the
naming used by the various Counter types.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
As suggested in PR review, move the intitialization of the cutoffs
before the struct creation.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Signed-off-by: jvaidya <jitendra.vaidya@gmail.com>
removed explanations of RBR vs SBR, we now support RBR
…r-logs

include the connection id as part of the mysql conn error logs
add support for BIGINT UNSIGNED <--> java.math.BigInteger
…improvements

Prometheus histogram improvements
…t-include-in-plan-json

include the MultiShardAutocommit boolean in the plan json
Enable Orchestrator maintenance mode during reparents
Move vtcombo initTabletMap func to vtcombo package
delete from table_name using table_reference
Couple of invocations were using keyspaceClean instead of
keyspace.name, which is "a-b" vs "a_b".

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
default helm vtgate maxReplicas to replicas
goimports gets confused by dashes and dots in import names.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
Use an alias so goimports doesn't delete a real import
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
…roviders.

Signed-off-by: David Weitzman <dweitzman@pinterest.com>
Defend against a potential race condition in registering push…
Drop the lock on the healthCheckConn in the error handler for
`StreamHealth` before calling `Close()` on the connection to
avoid holding the lock for a potentially long network operation.

Also change `GetConnection` to drop the lock on the HealthCheck
object before taking the lock on the individual connection object.

Finally add an Info log when the `StreamHealth` operation fails to
help in future diagnosis of this kind of error.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
…-stall

fix a potential blocking issue when StreamHealth fails
change HealthCheckConnections to be a gauge not a counter
…am-2018-05-06

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
@demmer demmer merged commit 021b5a1 into master May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants