Skip to content

Conversation

@benjamin-awd
Copy link
Owner

Summary

Vector configuration

How did you test this PR?

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@benjamin-awd benjamin-awd force-pushed the delta-lake branch 2 times, most recently from 779f822 to 494bf95 Compare January 5, 2026 06:22
benjamin-awd and others added 13 commits January 14, 2026 10:38
… parsing

Replace fragile string-based error detection with proper pattern matching
on DeltaTableError and ObjectStoreError variants. This provides:

- Type-safe error classification that won't break with upstream changes
- Cleaner separation of concerns with dedicated helper functions
- More reliable detection of concurrent conflicts and retriable errors

The ObjectStoreError variants (Precondition, AlreadyExists, PermissionDenied,
etc.) are now matched directly instead of searching for substrings like
"FAILED_PRECONDITION" or "412" in error messages.

Co-Authored-By: Claude <[email protected]>
…rKind enum

Introduce WriteErrorKind enum as a single source of truth for error
classification. This consolidates the duplicate error classification logic
that was spread across DeltaLakeService and DeltaLakeRetryLogic.

Benefits:
- Single place to update when error handling needs change
- Consistent classification between internal retry logic and Tower retry
- More readable code with semantic error kinds instead of boolean flags
- DeltaLakeRetryLogic reduced to a single line using the shared enum

The enum variants (ConcurrentConflict, SchemaMismatch, PermissionDenied,
NotFound, Transient, Permanent) map directly to retry strategies.

Co-Authored-By: Claude <[email protected]>
Collapse 6 error variants into 4 by merging similar non-retriable cases:
- ConcurrentConflict: internal retry with table reload
- SchemaMismatch: internal retry with schema reload
- Transient: Tower-level retry (IO, network)
- NonRetriable: no retry (permissions, not found, config errors)

This simplifies the error classification while maintaining the same
behavior - all the merged variants had identical retry semantics.

Co-Authored-By: Claude <[email protected]>
benjamin-awd and others added 4 commits January 15, 2026 15:04
Replace manual concurrent conflict retry loop with delta-rs built-in
retry mechanism via CommitProperties::with_max_retries(). This delegates
conflict resolution to the library which handles:
- Optimistic concurrency control
- Automatic retry on version conflicts
- Internal state management

The schema mismatch retry loop is preserved since it requires explicit
table reload to pick up schema changes, which the library doesn't do.

This removes ~50 lines of retry logic including the ExponentialBackoff
import and manual backoff/sleep handling.

Co-Authored-By: Claude <[email protected]>
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.

2 participants