Skip to content

Commit

Permalink
Merge pull request #1680 from josephschorr/lr-clone-metadata
Browse files Browse the repository at this point in the history
Make sure to clone metadata in LR before changing
  • Loading branch information
josephschorr authored Dec 8, 2023
2 parents 90be4e6 + 3ffaec7 commit a6ea7a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/graph/checkingresourcestream.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,10 @@ func (crs *checkingResourceStream) runProcess(alwaysProcess bool) (bool, error)
func (crs *checkingResourceStream) addSkippedDispatchCountToBePublished(metadata *v1.ResponseMeta) *v1.ResponseMeta {
dispatchCount := crs.dispatchesToBeReported.Swap(0)
cachedDispatchCount := crs.cachedDispatchesToBeReported.Swap(0)
metadata.DispatchCount += dispatchCount
metadata.CachedDispatchCount += cachedDispatchCount
return metadata
cloned := metadata.CloneVT()
cloned.DispatchCount += dispatchCount
cloned.CachedDispatchCount += cachedDispatchCount
return cloned
}

// spawnIfAvailable spawns a processing working, if the concurrency limit has not been reached.
Expand Down

0 comments on commit a6ea7a3

Please sign in to comment.