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

Simplify Job Deduplication #3579

Merged
merged 8 commits into from May 15, 2024
Merged

Simplify Job Deduplication #3579

merged 8 commits into from May 15, 2024

Conversation

d80tb7
Copy link
Collaborator

@d80tb7 d80tb7 commented May 12, 2024

Make job Deduplication simpler by:

  • Removing the PGKeyValue struct and simply inserting inio postgres in the deduplicator
  • Making the duplication table a standard table in the lookout db, managed by a schema migration
  • Removing the logic to hash clientids and instead storing the client id as simple string. To ensure users do not submit excessively long client ids we now validate that these do not exceed 100 bytes in length.
  • Removed the custom deduplication cleanup. This is now included in the lookout database pruner

Chris Martin added 4 commits May 12, 2024 17:57
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
@d80tb7 d80tb7 changed the title [WIP] Simplify Job Deduplication Simplify Job Deduplication May 12, 2024
Chris Martin added 2 commits May 12, 2024 22:14
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>
@d80tb7 d80tb7 enabled auto-merge (squash) May 15, 2024 12:05
d80tb7 and others added 2 commits May 15, 2024 13:14
Signed-off-by: Chris Martin <chris@cmartinit.co.uk>

func (s *PostgresDeduplicator) storeMappings(ctx *armadacontext.Context, mappings map[string]string) error {
deduplicationIDs := make([]string, 0, len(mappings))
jobIDs := make([]string, 0, len(mappings))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most minor point - elsewhere we use jobIds rather than jobIDs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes very true- I'll fix this in a follow up

@d80tb7 d80tb7 merged commit cb0e300 into master May 15, 2024
20 checks passed
@d80tb7 d80tb7 deleted the f/chrisma/dedup-tidy branch May 15, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants