An Azure relational database service.
Hi @Anonymous
Yes, the pattern you describe - using a single transaction with OUTPUT into a temp table, validating counts/fingerprints, then COMMIT or ROLLBACK - is fully supported on Hyperscale. As long as the batches remain short, the engine will maintain ACID guarantees and the rollback path is safe.
For isolation:
- Default READ COMMITTED (with RCSI enabled in Hyperscale) is generally the right balance.
- You only need SERIALIZABLE if you must block concurrent writers on overlapping keys, but that comes with higher contention.
- SNAPSHOT is optional if you want repeatable reads of untouched rows but not usually required for this write-check pattern.
Points to watch:
- Keep transactions small to avoid version store or log pressure.
-
OUTPUTinto temp tables is fine; just monitor tempdb if you capture large sets. - Rollback latency is bounded by log flush, but in practice short slices won’t hit issues.
So, yes - the “pre-commit self-check” approach is appropriate on Hyperscale, with default READ COMMITTED recommended.
I hope this information helps. Please do let us know if you have any further queries.
Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.