[BEAM-12356] Make sure DatasetService is always closed#15480
Merged
Conversation
98ed64f to
7e2e339
Compare
Contributor
Author
Contributor
Author
|
Run Java PreCommit |
apilloud
approved these changes
Sep 8, 2021
apilloud
left a comment
Member
There was a problem hiding this comment.
LGTM
It looks like DatasetService could use some cleanup around exception handling...
| BigQueryHelpers.verifyDatasetPresence(datasetService, tempTable); | ||
| } | ||
| } | ||
| } catch (Exception e) { |
Member
There was a problem hiding this comment.
Do you need this here? Can you catch more specific exceptions?
Contributor
Author
There was a problem hiding this comment.
close() throws Exception, so this is the best I can do.
| "Deleting temporary dataset with query results {}", tempTable.getDatasetId()); | ||
| datasetService.deleteDataset(tempTable.getProjectId(), tempTable.getDatasetId()); | ||
| } | ||
| } catch (Exception e) { |
Member
There was a problem hiding this comment.
It doesn't look like this is needed?
| if (getWriteDisposition() == BigQueryIO.Write.WriteDisposition.WRITE_EMPTY) { | ||
| BigQueryHelpers.verifyTableNotExistOrEmpty(datasetService, table); | ||
| } | ||
| } catch (Exception e) { |
| /** The list of unique ids for each BigQuery table row. */ | ||
| private transient Map<String, List<String>> uniqueIdsForTableRows; | ||
|
|
||
| private @Nullable DatasetService datasetService; |
| // shuffling. | ||
| private class InsertBatchedElements | ||
| extends DoFn<KV<ShardedKey<String>, Iterable<TableRowInfo<ElementT>>>, Void> { | ||
| private @Nullable DatasetService datasetService; |
Contributor
Author
|
Run Java PreCommit |
1 similar comment
Contributor
Author
|
Run Java PreCommit |
jklukas
approved these changes
Sep 9, 2021
4 tasks
Member
|
This fix is part of the 2.34 release which is currently underway.
You can track its progress on the ***@***.*** [1]. I believe the
current status is that release blocking issues have been resolved and the
first release candidate is being built.
1: ***@***.***:lte=99M:release
…On Mon, Oct 25, 2021 at 6:51 AM Djane Luz ***@***.***> wrote:
Do you have an idea when this fix will be released?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15480 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACM4V3AQSCLXXBOAE5PU2WLUIVOGJANCNFSM5DVJTMGA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
This file contains hidden or 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
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.
No description provided.