ash-project / ash-project/ash

Proposal: Allow for enforcning minimum bulk strategy on actions

Open
#2,099 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Elixir
Stars
2.5k
Forks
422
Avg merge
23h 26m
Merged PRs (30d)
46

Description

# Is your feature request related to a problem?
Bulk actions silently fall back to slower strategies (:atomic_batches / :stream). When writing hot-path code we need to guarantee the fastest path and fail fast if it isn’t possible.

# Describe the solution you’d like
Allow an action-level option, e.g. bulk_min_strategy :atomic, that raises if the data layer can’t meet that minimum (:atomic, :atomic_batches, or :stream). Default = no minimum (current behaviour).

# Describe alternatives you’ve considered
Currently manually setting `bulk_options: [strategy: :atomic]`, which should trigger the same behaviour but is easy to forget

Contributor guide

Open the contributing guide

Research direction

Start by tracing how action-level bulk_options selects among :atomic, :atomic_batches, and :stream, including where silent fallback occurs. Define how a bulk_min_strategy option would enforce the requested minimum and fail fast; done means the default remains unchanged and the requested minimum is honored.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.