Skip to content

fix: validate ScyllaDB operations before BatchQuery execution#52

Draft
hussein-awala wants to merge 1 commit intomainfrom
fix/scylladb-validate-before-batch
Draft

fix: validate ScyllaDB operations before BatchQuery execution#52
hussein-awala wants to merge 1 commit intomainfrom
fix/scylladb-validate-before-batch

Conversation

@hussein-awala
Copy link
Copy Markdown
Owner

Summary

  • Previously, validation happened inside the BatchQuery context manager, so valid operations were committed even when other operations in the same batch had validation errors
  • This caused partial batch execution that callers couldn't easily detect
  • Now all operations are validated upfront before entering BatchQuery
  • Only valid operations are added to the batch, preventing partial side effects
  • Also removes the keyword-only *, batch constraint to match the base class contract (fixes run_in_executor compatibility — see fix: remove keyword-only constraint on ScyllaDB process_batch param #40)

Test plan

  • Existing ScyllaDB integration tests pass (both success and exception tests)
  • Verify that invalid operations don't cause partial commits

🤖 Generated with Claude Code

Previously, validation happened inside the BatchQuery context manager,
so valid operations in the same batch would be committed even when
other operations had validation errors. This caused partial batch
execution that callers couldn't easily detect.

Now all operations are validated upfront. Only valid operations are
added to the BatchQuery, ensuring the batch is either fully valid
or all invalid operations are reported without partial side effects.

Also removes keyword-only constraint on batch param to match the
base class contract (fixes run_in_executor compatibility).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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