You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/08/16 17:23:02 UTC
[jira] [Commented] (BEAM-12504) SpannerIO Read
SessionNotFoundException for long-running pipline
[ https://issues.apache.org/jira/browse/BEAM-12504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17399852#comment-17399852 ]
Beam JIRA Bot commented on BEAM-12504:
--------------------------------------
This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.
Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.
> SpannerIO Read SessionNotFoundException for long-running pipline
> ----------------------------------------------------------------
>
> Key: BEAM-12504
> URL: https://issues.apache.org/jira/browse/BEAM-12504
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Minbo Bae
> Priority: P2
> Labels: stale-P2
> Attachments: spanner_error.png, spanner_graph.png
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> [SpannderIO|https://github.com/apache/beam/blob/v2.30.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java#L328] creates a transaction session with [CreateTransaction|https://github.com/apache/beam/blob/v2.30.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java#L747] at the beginning of pipeline run. If the pipeline takes a long time to run SpannerIO.ReadAll like the following, the session can be [cleaned up|https://cloud.google.com/spanner/docs/sessions#keep_an_idle_session_alive] by Spanner service. The Spanner read step fails with error {{com.google.cloud.spanner.SessionNotFoundException: NOT_FOUND: com.google.api.gax.rpc.NotFoundException: io.grpc.StatusRuntimeException: NOT_FOUND: Session not found: projects/<PROJECT>/instances/<INSTANCE>/databases/<DATABASE>/sessions/<SESSION_ID>}}
> {code:java}
> PCollection<ReadOperation> queries = pipeline
> .apply(Create.of((Void)null))
> .apply(ParDo.of( ... )); // long running. for example more than 2 hours
> queries
> .apply(SpanerIO.readAll().withSpannerConfig(...))
> .apply(ParDo.of( ... ));
> {code}
> See the attached files for my job graph and errors in Dataflow.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)