Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_batch set include_deleted to false by default when reading a version #1419

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

muhammadhamzasajjad
Copy link
Collaborator

@muhammadhamzasajjad muhammadhamzasajjad commented Mar 13, 2024

Fixes #1385
Similar to a normal read, batch_read now sets include_deleted to false when looking for an index key via find_index_key_for_version_id

  • removed test_batch_read_metadata_multi as self._versions.items() has versions that have already been deleted, the test tries to lookup the deleted versions and tries to asserts that they are found
  • removed test_batch_read_snapshot as the VersionStoreComparison creates a test sequence where it first deletes a symbol, then with test_batch_read_snapshot checks that the versions in the snapshot match the versions read with batch_read which is not the expected behaviour because deleted versions will not be returned by batch read.
  • similarly removed test_batch_read_tombstoned_version_via_snapshot as, with batch_read(symbol, as_of=[version]) , we shouldn't expect to read a snapshotted version that has been deleted.

Checklist

Checklist for code changes...
  • Have you updated the relevant docstrings, documentation and copyright notice?
  • Is this contribution tested against all ArcticDB's features?
  • Do all exceptions introduced raise appropriate error messages?
  • Are API changes highlighted in the PR description?
  • Is the PR labelled as enhancement or bug so it appears in autogenerated release notes?

@muhammadhamzasajjad muhammadhamzasajjad self-assigned this Mar 13, 2024
@muhammadhamzasajjad muhammadhamzasajjad merged commit 5c12ab9 into master Mar 15, 2024
114 checks passed
@muhammadhamzasajjad muhammadhamzasajjad deleted the batch_read_deleted_version_exception branch March 15, 2024 10:30
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.

read_batch raises a DataError with as_of a deleted version
2 participants