Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore Options over deletion of StreamRange<T>::reader_ #8403

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Feb 17, 2022

Restore the creation-time Options in the StreamRange<T> destructor
while explicitly clearing the reader_ functor. If the reader has not
reached the end of the range, then deleting it may send a best-effort,
out-of-band cancel on the call, and we should restore the options when
re-entering the library. Add a test for the destructor case. This is
a followup to #8256.

Also take this opportunity to delete some unused type aliases I stumbled
upon during this work.


This change is Reviewable

Restore the creation-time `Options` in the `StreamRange<T>` destructor
while explicitly clearing the `reader_` functor.  If the reader has not
reached the end of the range, then deleting it may send a best-effort,
out-of-band cancel on the call, and we should restore the options when
re-entering the library.  Add a test for the destructor case.  This is
a followup to googleapis#8256.

Also take this opportunity to delete some unused type aliases I stumbled
upon during this work.
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 0c98db656b437b79a06e61015f614551960b7f70

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #8403 (0c98db6) into main (541eb09) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8403      +/-   ##
==========================================
- Coverage   95.09%   95.08%   -0.02%     
==========================================
  Files        1360     1360              
  Lines      121124   121150      +26     
==========================================
+ Hits       115185   115196      +11     
- Misses       5939     5954      +15     
Impacted Files Coverage Δ
...loud/internal/resumable_streaming_read_rpc_test.cc 90.24% <ø> (ø)
google/cloud/internal/streaming_read_rpc_test.cc 98.03% <ø> (ø)
google/cloud/internal/streaming_write_rpc_test.cc 100.00% <ø> (ø)
google/cloud/stream_range.h 100.00% <100.00%> (ø)
google/cloud/stream_range_test.cc 100.00% <100.00%> (ø)
...e/cloud/spanner/testing/cleanup_stale_instances.cc 61.29% <0.00%> (-19.36%) ⬇️
google/cloud/internal/filesystem.h 91.83% <0.00%> (-4.09%) ⬇️
google/cloud/internal/filesystem.cc 92.85% <0.00%> (-1.43%) ⬇️
...le/cloud/storage/internal/curl_download_request.cc 88.69% <0.00%> (-1.07%) ⬇️
google/cloud/bigtable/async_read_stream_test.cc 97.32% <0.00%> (-0.67%) ⬇️
... and 2 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 541eb09...0c98db6. Read the comment docs.

@devbww devbww marked this pull request as ready for review February 17, 2022 09:22
@devbww devbww requested a review from a team as a code owner February 17, 2022 09:22
@devbww devbww merged commit 2fd4118 into googleapis:main Feb 17, 2022
@devbww devbww deleted the resumable-streaming-options-span branch February 17, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants