Skip to content
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

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

Sidddddarth
Copy link
Member

Description

using the memoized payloadFunc for deduplication.

Linear Ticket

< Replace with Linear Link >

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Sep 14, 2023
@Sidddddarth Sidddddarth force-pushed the chore.memoizePayloadFuncForDedup branch from 670190b to 1a34065 Compare September 15, 2023 12:45
@Sidddddarth Sidddddarth marked this pull request as ready for review September 15, 2023 12:47
@Sidddddarth Sidddddarth marked this pull request as draft September 15, 2023 12:47
@github-actions github-actions bot removed the Stale label Sep 16, 2023
@Sidddddarth Sidddddarth force-pushed the chore.memoizePayloadFuncForDedup branch from 1a34065 to 79cdb59 Compare September 18, 2023 11:11
@Sidddddarth Sidddddarth marked this pull request as ready for review September 18, 2023 11:11
@Sidddddarth Sidddddarth force-pushed the chore.memoizePayloadFuncForDedup branch from 79cdb59 to 1bc997e Compare September 19, 2023 15:23
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch coverage: 70.00% and project coverage change: -0.08% ⚠️

Comparison is base (f5b8e7b) 69.20% compared to head (cd41372) 69.12%.

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     
Files Changed Coverage Δ
processor/processor.go 87.38% <70.00%> (-0.13%) ⬇️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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 {
Copy link
Collaborator

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.

Copy link
Member Author

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? 😜

😂

@Sidddddarth Sidddddarth requested review from cisse21 and removed request for cisse21 September 20, 2023 16:13
@Sidddddarth Sidddddarth force-pushed the chore.memoizePayloadFuncForDedup branch from 1bc997e to cd41372 Compare September 21, 2023 09:09
@Sidddddarth Sidddddarth merged commit 74f5f11 into master Sep 21, 2023
35 checks passed
@Sidddddarth Sidddddarth deleted the chore.memoizePayloadFuncForDedup branch September 21, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants