Skip to content

Spanner use custom thread factory - #5167

Merged
kolea2 merged 14 commits into
googleapis:masterfrom
olavloite:spanner-use-custom-thread-factory
May 15, 2019
Merged

Spanner use custom thread factory#5167
kolea2 merged 14 commits into
googleapis:masterfrom
olavloite:spanner-use-custom-thread-factory

Conversation

@olavloite

Copy link
Copy Markdown
Contributor

Use a custom ThreadFactory for the underlying gRPC clients to make it easier to determine and debug which service has created the threads.

Using a custom thread factory for the different underlying gRPC clients
makes it easier to debug potential thread problems, as the name of the
thread indicates to which client it belongs.
@olavloite
olavloite requested a review from a teamMay 9, 2019 15:22
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label May 9, 2019
@olavloite
olavloite requested a review from kolea2May 9, 2019 15:22
@kolea2

Copy link
Copy Markdown
Contributor

This looks good, do you think we can add an IT test as well for this?

Separately, anything we can test on the transport channel and its threads?

Setting an executor provider on the stub settings would cause the
executors to be shared between the underlying gRPC channels. Instead,
each channel should have its own executor. The executor provider is now
set on the channel provider again, but the executor provider keeps track
of the executors that have been handed out and closes these when the
Spanner instance is closed.
This approach is equal to the approach that was already used for the
spannerWatchdog executor.
@codecov

codecovBot commented May 10, 2019

Copy link
Copy Markdown

Codecov Report

Merging #5167 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #5167 +/- ##
============================================
+ Coverage 50.38% 50.4% +0.02% - Complexity 23736 23785 +49 
============================================
Files 2248 2251 +3 Lines 226471 226792 +321 Branches 24954 24966 +12 ============================================
+ Hits 114109 114320 +211 - Misses 103770 103865 +95 - Partials 8592 8607 +15
Impacted FilesCoverage ΔComplexity Δ
...n/java/com/google/cloud/bigquery/BigQueryImpl.java80.21% <0%> (-3.89%)58% <0%> (+5%)
...able/gaxx/reframing/ReframingResponseObserver.java88.99% <0%> (-1.84%)29% <0%> (-1%)
...e/cloud/bigquery/testing/RemoteBigQueryHelper.java62.5% <0%> (-1.14%)6% <0%> (ø)
.../google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java6.1% <0%> (-0.83%)2% <0%> (ø)
...ud/talent/v4beta1/stub/CompletionStubSettings.java0% <0%> (ø)0% <0%> (ø)⬇️
...gle/cloud/bigtable/data/v2/BigtableDataClient.java89.58% <0%> (ø)32% <0%> (ø)⬇️
...m/google/cloud/tasks/v2beta3/CloudTasksClient.java57.43% <0%> (ø)67% <0%> (ø)⬇️
.../com/google/cloud/bigquery/spi/v2/BigQueryRpc.java77.77% <0%> (ø)0% <0%> (ø)⬇️
...va/com/google/cloud/tasks/v2/CloudTasksClient.java57.43% <0%> (ø)67% <0%> (ø)⬇️
...le/cloud/pubsub/v1/stub/PublisherStubSettings.java84.06% <0%> (ø)20% <0%> (ø)⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 229ee93...7d1b5ed. Read the comment docs.

@kolea2kolea2 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 10, 2019
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 10, 2019
@kolea2
kolea2 merged commit 52dc8d0 into googleapis:masterMay 15, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@olavloite@kolea2@googlebot@yoshi-kokoro