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

Conversation

@devbww
Copy link
Contributor

@devbww devbww commented Dec 4, 2019

Any I/O manipulator that sets a per-stream I/O format flag
is not thread safe, as recent ThreadSanitizer warnings attest.
So, set std::ios::boolalpha in the benchmarks before we fork
any threads, rather than during concurrent output operations.


This change is Reviewable

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2019
@codecov
Copy link

codecov bot commented Dec 4, 2019

Codecov Report

Merging #1128 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #1128 +/- ## ========================================== - Coverage 93.49% 93.46% -0.04%  ========================================== Files 166 165 -1 Lines 12782 12779 -3 ========================================== - Hits 11951 11944 -7  - Misses 831 835 +4
Impacted Files Coverage Δ
.../spanner/benchmarks/multiple_rows_cpu_benchmark.cc 64.05% <100%> (+0.07%) ⬆️
...nner/benchmarks/single_row_throughput_benchmark.cc 93.1% <100%> (+0.77%) ⬆️
...ogle/cloud/spanner/benchmarks/benchmarks_config.cc 97.16% <100%> (ø) ⬆️
google/cloud/spanner/internal/spanner_stub.cc 67.03% <0%> (-2.2%) ⬇️
...loud/spanner/internal/partial_result_set_source.cc 93.24% <0%> (-1.36%) ⬇️
google/cloud/spanner/client.cc 89.18% <0%> (-0.91%) ⬇️
google/cloud/spanner/samples/samples.cc 86.08% <0%> (-0.29%) ⬇️
...on_tests/rpc_failure_threshold_integration_test.cc 85.55% <0%> (-0.16%) ⬇️
...anner/integration_tests/client_integration_test.cc 98.96% <0%> (-0.01%) ⬇️
google/cloud/spanner/keys.h 100% <0%> (ø) ⬆️
... and 4 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 09f3c95...edb1226. Read the comment docs.

@devbww devbww requested a review from devjgm December 4, 2019 23:24
Any I/O manipulator that sets a per-stream I/O format flag is not thread safe, as recent ThreadSanitizer warnings attest. So, set std::ios::boolalpha in the benchmarks before we fork any threads, rather than during concurrent output operations.
@devbww devbww force-pushed the iostream-concurrency branch from 2482528 to edb1226 Compare December 5, 2019 19:06
@devbww devbww marked this pull request as ready for review December 6, 2019 18:18
@devbww devbww merged commit c0438ad into googleapis:master Dec 6, 2019
@devbww devbww deleted the iostream-concurrency branch December 6, 2019 18:48
devjgm pushed a commit to devjgm/google-cloud-cpp that referenced this pull request May 7, 2020
…/google-cloud-cpp-spanner#1128) Any I/O manipulator that sets a per-stream I/O format flag is not thread safe, as recent ThreadSanitizer warnings attest. So, set std::ios::boolalpha in the benchmarks before we fork any threads, rather than during concurrent output operations.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

3 participants