Skip to content

Implement bulk task creation for create/update challenge workflows#1235

Open
CollinBeczak wants to merge 3 commits into
mainfrom
Add-bulk-insert-methods
Open

Implement bulk task creation for create/update challenge workflows#1235
CollinBeczak wants to merge 3 commits into
mainfrom
Add-bulk-insert-methods

Conversation

@CollinBeczak

Copy link
Copy Markdown
Contributor
  • Introduced bulkMergeNewTasks and bulkInsertNewTasks methods in TaskDAL for efficient task insertion.
  • Updated ChallengeProvider to use these methods for creating tasks based on feature lists, handling cooperative tasks appropriately.
  • Refactored task creation logic to streamline the process and improve performance during bulk operations.

@sonarqubecloud

Copy link
Copy Markdown

- Introduced `bulkMergeNewTasks` and `bulkInsertNewTasks` methods in TaskDAL for efficient task insertion.
- Updated ChallengeProvider to use these methods for creating tasks based on feature lists, handling cooperative tasks appropriately.
- Refactored task creation logic to streamline the process and improve performance during bulk operations.
@CollinBeczak CollinBeczak force-pushed the Add-bulk-insert-methods branch from 8508d9a to 9f420bc Compare July 10, 2026 00:01
…erative routing

Bulk insert uses ON CONFLICT DO NOTHING, which silently keeps the first
row on a same-batch name collision while the returned Task list still
associated every duplicate with that row's id. Dedupe by lower(name) in
Scala first, keeping the last occurrence to match create_update_task's
old upsert (last-write-wins) semantics — Postgres also rejects a single
ON CONFLICT DO UPDATE touching the same conflict target twice, so this
can't be pushed into the SQL itself.

Also adds unit tests for looksCooperative/dedupeTasksByName and for the
ChallengeProvider routing/priority-recompute behavior.
@sonarqubecloud

Copy link
Copy Markdown

@CollinBeczak CollinBeczak marked this pull request as ready for review July 10, 2026 00:45
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.

1 participant