-
Notifications
You must be signed in to change notification settings - Fork 81
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
feat: Add a flushAll() method that will flush all the inflight request and make sure all responses returned #492
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google-cla
bot
added
the
cla: yes
This human has signed the Contributor License Agreement.
label
Aug 14, 2020
Wilson720
reviewed
Aug 14, 2020
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Outdated
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #492 +/- ##
============================================
+ Coverage 78.11% 78.67% +0.56%
- Complexity 642 662 +20
============================================
Files 58 59 +1
Lines 3687 3789 +102
Branches 235 255 +20
============================================
+ Hits 2880 2981 +101
- Misses 687 692 +5
+ Partials 120 116 -4
Continue to review full report at Codecov.
|
yirutang
changed the title
feat: Add a flushAll() method that will flush all the inflight request and make sure all responses returned.
feat: Add a flushAll() method that will flush all the inflight request and make sure all responses returned
Aug 14, 2020
…e pipe are sent and responded
Wilson720
reviewed
Aug 15, 2020
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Show resolved
Hide resolved
That's a design detail, a choice of either make flush wait or append wait.
For now, let's keep it simple by asking append wait. In the final
operation, user has to make sure flush is called last.
…On Sat, Aug 15, 2020 at 9:51 AM weizhengli1992 ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
<#492 (comment)>
:
> @@ -265,6 +273,28 @@ public Boolean expired() {
return outstandingAppend.appendResult;
}
+ /**
+ * This is the general flush method for asynchronise append operation. When you have outstanding
+ * append requests, calling flush will make sure all outstanding append requests completed and
+ * successful. Otherwise there will be an exception thrown.
+ *
+ * @throws Exception
+ */
+ public void flushAll() throws Exception {
+ writeAllOutstanding();
+ synchronized (messagesWaiter) {
I had this discussion with Bigang previously and we decided to keep allow
user to append instead of block. Just wait for all pending stream before
the time user call FlushAll() but keep accepting new requests. (Flush all
will not wait for new requests).
Do you think this make sense to this case as well?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHGYVETCS7BHII7DNPCA3R3SA24HJANCNFSM4P74BZSQ>
.
--
Thanks.
Yiru
|
Wilson720
approved these changes
Aug 17, 2020
...gquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java
Outdated
Show resolved
Hide resolved
stephaniewang526
suggested changes
Aug 19, 2020
...gquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java
Outdated
Show resolved
Hide resolved
stephaniewang526
approved these changes
Aug 19, 2020
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Aug 19, 2020
🤖 I have created a release \*beep\* \*boop\* --- ## [1.5.0](https://www.github.com/googleapis/java-bigquerystorage/compare/v1.4.1...v1.5.0) (2020-08-19) ### Features * Add a flushAll() method that will flush all the inflight request and make sure all responses returned ([#492](https://www.github.com/googleapis/java-bigquerystorage/issues/492)) ([6134818](https://www.github.com/googleapis/java-bigquerystorage/commit/6134818f7bc5ada324a78d5c048bb2eeb83f8ca8)) * add JsonWriterCache.java and added JsonWriterCache in DirectWriter to allow JsonWrites ([#489](https://www.github.com/googleapis/java-bigquerystorage/issues/489)) ([34193b8](https://www.github.com/googleapis/java-bigquerystorage/commit/34193b88bcf64b97dbcde2183e7587fa44923d4b)) ### Dependencies * update dependency com.google.cloud:google-cloud-bigquery to v1.116.10 ([#483](https://www.github.com/googleapis/java-bigquerystorage/issues/483)) ([285b6f8](https://www.github.com/googleapis/java-bigquerystorage/commit/285b6f846753f387800d2787746ddb43de67a4b7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
shubhwip
pushed a commit
to shubhwip/java-bigquerystorage
that referenced
this pull request
Oct 7, 2023
…cies to v0.20.1 (googleapis#492) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `0.20.0` -> `0.20.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.20.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.20.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.20.1/compatibility-slim/0.20.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.20.1/confidence-slim/0.20.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-shared-dependencies</summary> ### [`v0.20.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​0201-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare0200v0201-2021-03-09) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v0.20.0...v0.20.1) </details> --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage-nio).
shubhwip
pushed a commit
to shubhwip/java-bigquerystorage
that referenced
this pull request
Oct 7, 2023
🤖 I have created a release \*beep\* \*boop\* --- ### [0.122.11](https://www.github.com/googleapis/java-storage-nio/compare/v0.122.10...v0.122.11) (2021-03-16) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([googleapis#492](https://www.github.com/googleapis/java-storage-nio/issues/492)) ([684ae0a](https://www.github.com/googleapis/java-storage-nio/commit/684ae0ab43d8bed5dff07472866769b07ecd0dd5)) * update dependency com.google.cloud:google-cloud-storage to v1.113.12 ([googleapis#472](https://www.github.com/googleapis/java-storage-nio/issues/472)) ([34819d9](https://www.github.com/googleapis/java-storage-nio/commit/34819d986dfebe953eec603718ab339018d69d12)) * update dependency com.google.cloud:google-cloud-storage to v1.113.13 ([googleapis#491](https://www.github.com/googleapis/java-storage-nio/issues/491)) ([14bacab](https://www.github.com/googleapis/java-storage-nio/commit/14bacaba6336835b1686d91fb98c394785d7821d)) * update dependency com.google.cloud:google-cloud-storage to v1.113.14 ([googleapis#495](https://www.github.com/googleapis/java-storage-nio/issues/495)) ([5eb9102](https://www.github.com/googleapis/java-storage-nio/commit/5eb9102c61fade3412c0398f18b57feb37fa0695)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️