Recommended upgrade
If you run 0.10.5 or later on the queued bulk path, upgrade to Blnk Core 0.15.0 or later. From 0.15.0, Core migrations add expression indexes onmeta_data->>'QUEUED_PARENT_TRANSACTION' and related queue hot paths. Without those indexes, commit, refund, and parent lookups can fall back to sequential scans and drain the queue slowly under load.
Prefer upgrading over staying on 0.10.5–0.14.x with a hand-applied index.
If you cannot upgrade yet, create the index manually on your Postgres database:
CREATE INDEX CONCURRENTLY cannot run inside a transaction block. Run it as a standalone statement. On large tables it can take time, but it avoids locking writes while the index builds.idx_txn_meta_queued_parent (partial, where the key is present) plus related queue indexes. After you upgrade, you do not need to keep a separate hand-created index unless your operator process requires it.
Breaking changes summary
- From: Bulk create always processed items synchronously (
skip_queueeffectivelytrue). - To: Bulk create defaults to
skip_queue: falseand enqueues each item. - Impact: A successful bulk response no longer guarantees that every child transaction is already
APPLIEDorINFLIGHTon balances. Parent linking and duplicate-reference behaviour also follow the queued path unless you opt out.
What changed
- Default queueing: Bulk create now respects
skip_queueand defaults it tofalse. Before 0.10.5, Blnk forced synchronous processing inside the batch. - Response meaning: On the default path,
status: "applied"means the batch was successfully submitted, not that every child has already moved balances. - Parent linking: With
skip_queue: false, children storebatch_idinmeta_data.QUEUED_PARENT_TRANSACTION. Withskip_queue: true, children setparent_transactiontobatch_id. - Duplicate references: On the queued path, duplicate references are deduplicated silently and the batch can still return
201. Onskip_queue: true, duplicates fail the batch with409.
Who is affected?
Review this change if your integration:- Reads balances or child transaction statuses immediately after bulk create
- Treats bulk
status: "applied"as proof that every item is final - Looks up batch children only by
parent_transaction - Relies on synchronous
409failures for duplicate references inside a bulk request
Migration options
Choose one path based on what your next step needs.Option 1: Keep synchronous processing
Add"skip_queue": true to restore the previous inline behaviour.
Use this when the next step in your app needs the ledger outcome before the HTTP call returns (for example, show an updated balance, fail the request with the batch, or chain another post that depends on these balances).
skip_queue: true:
- Child statuses and balances update in the same request when
run_asyncisfalse. - Look up children with
parent_transaction = batch_id. - Duplicate references fail the batch with
409.
Option 2: Adopt the queued default
Omitskip_queue or set "skip_queue": false. Then update your confirmation path:
- Save
batch_idfrom the create response. - Do not treat
status: "applied"as final ledger success for every child. - Confirm child outcomes by filtering on
meta_data.QUEUED_PARENT_TRANSACTION, or wait forbulk_transaction.applied,bulk_transaction.inflight, orbulk_transaction.failedwhen you userun_async: true.
Response
Migration checklist
- Prefer upgrading to 0.15.0 or later so queue parent indexes are applied by migration.
- If you must stay below 0.15.0 for now, create
idx_transactions_queued_parentmanually (see Recommended upgrade). - Decide per bulk call whether you need sync (
skip_queue: true) or queue (skip_queue: false). - Update any code that assumes balances change, or that an external payout is safe, before the bulk create response returns.
- Confirm child outcomes with webhooks or by filtering on
meta_data.QUEUED_PARENT_TRANSACTIONbefore you call external providers or release funds. - Update batch child lookups to use
meta_data.QUEUED_PARENT_TRANSACTIONon the default path, orparent_transactionwhen you setskip_queue: true. - Revisit duplicate-reference handling if you previously relied on synchronous
409failures. - For large batches, prefer
run_async: trueand handle bulk webhooks.
This migration guide covers the bulk queueing change in Blnk v0.10.5 and the follow-on queue index fix in v0.15.0. For other features and fixes, see the release notes.