[ https://issues.apache.org/jira/browse/BEAM-5928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123028#comment-17123028 ]
Beam JIRA Bot commented on BEAM-5928: ------------------------------------- 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. > ConcurrentModificationException from RowCoderGenerator lazy caching > ------------------------------------------------------------------- > > Key: BEAM-5928 > URL: https://issues.apache.org/jira/browse/BEAM-5928 > Project: Beam > Issue Type: Bug > Components: sdk-java-core > Reporter: Benson Tucker > Priority: P2 > Labels: stale-P2 > Time Spent: 1h 10m > Remaining Estimate: 0h > > h3. Summary: > RowCoderGenerator caches a delegate Coder<Row> once encode or decode is > exercised, but there's not an API for caching this delegate eagerly. > h3. Use Case: > When creating several PCollections to perform distinct reads with the same > schema, you might create one RowCoder.of(schema) before creating the list of > PCollections / PCollectionsList. However, once the pipeline begins and rows > arrive for encoding, these pipelines will simultaneously try to cache a > delegate coder for the row's schema. > h3. Workaround: > You can force the eager caching of the code by exercising encode in the main > application before creating PCollections using the RowCoder: > {code:java} > try { > myRowCoder.encode(null, null); > } catch (IOException | NullPointerException e) { > // do nothing > } > {code} > h3. Context: > I've only encountered this during development with the direct runner. -- This message was sent by Atlassian Jira (v8.3.4#803005)