-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use memoized payloadFunc for dedup #3780
Conversation
This PR is considered to be stale. It has been open 20 days with no further activity thus it is going to be closed in 5 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR. |
670190b
to
1a34065
Compare
1a34065
to
79cdb59
Compare
79cdb59
to
1bc997e
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3780 +/- ##
==========================================
- Coverage 69.20% 69.12% -0.08%
==========================================
Files 353 353
Lines 53021 53024 +3
==========================================
- Hits 36694 36655 -39
- Misses 14023 14060 +37
- Partials 2304 2309 +5
☔ View full report in Codecov by Sentry. |
processor/processor.go
Outdated
@@ -1446,10 +1446,17 @@ func (proc *Handle) processJobsForDest(partition string, subJobs subJob) *transf | |||
proc.logger.Errorf("Dropping Job since Source not found for sourceId %q: %v", sourceId, sourceError) | |||
continue | |||
} | |||
payload := ro.Memoize(func() json.RawMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this one here is called payload
but later on we got a payloadFunc
(line 1486) that is also returning a payload, all within the same loop 🤔 What the func is going on? 😜
Jokes aside, imo we could use some better names for these variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the func is going on? 😜
😂
1bc997e
to
cd41372
Compare
Description
using the memoized
payloadFunc
for deduplication.Linear Ticket
< Replace with Linear Link >
Security