[
https://issues.apache.org/jira/browse/BEAM-4468?focusedWorklogId=202907&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-202907
]
ASF GitHub Bot logged work on BEAM-4468:
----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Feb/19 22:20
Start Date: 22/Feb/19 22:20
Worklog Time Spent: 10m
Work Description: aaltay commented on pull request #7927: [BEAM-4468] Go
SDK Combiner Lifting cache cap & eviction.
URL: https://github.com/apache/beam/pull/7927#discussion_r259529801
##########
File path: sdks/go/pkg/beam/core/runtime/exec/combine.go
##########
@@ -318,6 +318,27 @@ func (n *LiftedCombine) ProcessElement(ctx
context.Context, value *FullValue, va
return n.fail(err)
}
+ // TODO(BEAM-4468): replace with some better implementation
+ // once adding dependencies is easier.
+ // Arbitrary limit until a broader improvement can be demonstrated.
+ const cacheMax = 2000
+ if len(n.cache) > cacheMax {
Review comment:
Once the cache size reaches 2000, would not this be a loop of combine 2
elements, evict 2 elements? Would evicting the whole cache at this point be a
better solution?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 202907)
Time Spent: 1h 50m (was: 1h 40m)
> Go SDK-Tune in memory pre-combine caching for Lifted Combines.
> --------------------------------------------------------------
>
> Key: BEAM-4468
> URL: https://issues.apache.org/jira/browse/BEAM-4468
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Robert Burke
> Priority: Minor
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Requires [BEAM-4276|https://issues.apache.org/jira/browse/BEAM-4276] to be
> completed first.
> Additional performance tweaks to the in memory per-key accumulator cache
> during the pre-combine phase of a lifted combine.
> This can include any of
> * capping the number of key-accumulator in the cache, and draining them
> eagerly after x elements seen, or evicting keys by some heuristic after the
> cache has seen X distinct keys.
> * providing a counter on cache size (key/element counts) exposable through
> the metrics interface or another runner standard counter, to permit observing
> the cache's status, especially if it could grow without bound within a bundle.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)