[
https://issues.apache.org/jira/browse/BEAM-12979?focusedWorklogId=659122&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-659122
]
ASF GitHub Bot logged work on BEAM-12979:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Oct/21 19:26
Start Date: 01/Oct/21 19:26
Worklog Time Spent: 10m
Work Description: jrmccluskey commented on pull request #15639:
URL: https://github.com/apache/beam/pull/15639#issuecomment-932494462
R: @lostluck @youngoli
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 659122)
Time Spent: 20m (was: 10m)
> [Go SDK] Avoid shallow copying CacheToken protobufs in statecache.go
> --------------------------------------------------------------------
>
> Key: BEAM-12979
> URL: https://issues.apache.org/jira/browse/BEAM-12979
> Project: Beam
> Issue Type: Bug
> Components: sdk-go
> Reporter: Daniel Oliveira
> Assignee: Jack McCluskey
> Priority: P2
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Copying protobuf messages should be avoided because it causes a ton of subtle
> bugs, especially when mutexes inside the object get copied. We should be
> using pointers instead.
> Some spots where copies of CacheTokens are made instead of pointers:
> [https://github.com/apache/beam/blob/f051cd91d46e5dab0ca48f108b27d9d87e6e5e8f/sdks/go/pkg/beam/core/runtime/harness/statecache/statecache.go#L92]
> [https://github.com/apache/beam/blob/f051cd91d46e5dab0ca48f108b27d9d87e6e5e8f/sdks/go/pkg/beam/core/runtime/harness/statecache/statecache.go#L124]
> [https://github.com/apache/beam/blob/f051cd91d46e5dab0ca48f108b27d9d87e6e5e8f/sdks/go/pkg/beam/core/runtime/harness/statecache/statecache_test.go#L119]
> This isn't an exhaustive list, but it covers some of the major instances.
> Should be easy enough to ctrl+f "fnpb.ProcessBundleRequest_CacheToken" and
> just make sure it's used as a pointer wherever possible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)