[ 
https://issues.apache.org/jira/browse/BEAM-11075?focusedWorklogId=508307&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-508307
 ]

ASF GitHub Bot logged work on BEAM-11075:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Nov/20 00:30
            Start Date: 06/Nov/20 00:30
    Worklog Time Spent: 10m 
      Work Description: youngoli commented on a change in pull request #13245:
URL: https://github.com/apache/beam/pull/13245#discussion_r518452815



##########
File path: sdks/go/pkg/beam/io/synthetic/source.go
##########
@@ -131,8 +130,19 @@ func (fn *sourceFn) ProcessElement(rt *sdf.LockRTracker, 
config SourceConfig, em
        for i := rt.GetRestriction().(offsetrange.Restriction).Start; 
rt.TryClaim(i) == true; i++ {
                key := make([]byte, config.KeySize)
                val := make([]byte, config.ValueSize)
-               if _, err := fn.rng.Read(key); err != nil {
-                       return err
+               generator := sourceFn{}
+               generator.rng = rand.New(rand.NewSource(i))

Review comment:
       Hm... I have objections with the way that one is coded too, but that's 
something for me to discuss with the original author. It's definitely 
reasonable to match the Python implementation.
   
   In that case, my only remaining advice is, instead of creating a new Rand 
object with a new source each time you want to reseed (in other words, in each 
position), create the Rand objects in the beginning of `ProcessElement` and 
then call [Rand.Seed](https://golang.org/pkg/math/rand/#Rand.Seed) when you 
want to reseed.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 508307)
    Time Spent: 4h 20m  (was: 4h 10m)

> Load Tests for Go SDK
> ---------------------
>
>                 Key: BEAM-11075
>                 URL: https://issues.apache.org/jira/browse/BEAM-11075
>             Project: Beam
>          Issue Type: Test
>          Components: sdk-go, testing
>            Reporter: Kamil Wasilewski
>            Assignee: Kamil Wasilewski
>            Priority: P3
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> We have Load Tests for Python and Java SDKs[1], but we are missing the ones 
> for Go SDK.
> Tests to be done:
>  * ParDo
>  * Combine
>  * coGBK
>  * GBK
>  * Side Input
> The tests should run on Dataflow and Flink. The tests should be using 
> synthetic source and be running in batch mode.
> [1]http://metrics.beam.apache.org/dashboards/f/OtXje1iGz/performance-tests-metrics



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to