Skip to content

Commit

Permalink
Performance regression when requesting a timestamp before the earlies…
Browse files Browse the repository at this point in the history
…t version (#2076)

#### Reference Issues/PRs
Fixes #1772

#### What does this implement or fix?
Version Map entry now stores whether the whole chain has been loaded, so
we don't need to reload again in certain scenarios
* load_strategy_ is removed from version_map_entry and replaced with a
flag is_earliest_version_loaded in LoadProgress as we only need to know
whether the entire version chain has been loaded previously. Previously
we only kept whether the cache has been loaded with an ALL strategy but
that missed the cases where we load via DOWN_TO 0 or FROM_TIME that is
before earliest
* if we haven't loaded the entire version chain, we additionally check
if we have loaded all undeleted versions. This is in cases where we have
tombstone_all on a certain version and an undeleted version is
requested. See
#2076 (comment)
* this means that tombstone_all should not invalidate cache. see
#2076 (comment)

* Performance has improved

![image](https://github.com/user-attachments/assets/8e43b720-3de1-4a10-94d2-8454c436c1d1)


#### Any other comments?

#### Checklist

<details>
  <summary>
   Checklist for code changes...
  </summary>
 
- [ ] Have you updated the relevant docstrings, documentation and
copyright notice?
- [ ] Is this contribution tested against [all ArcticDB's
features](../docs/mkdocs/docs/technical/contributing.md)?
- [ ] Do all exceptions introduced raise appropriate [error
messages](https://docs.arcticdb.io/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?
</details>

<!--
Thanks for contributing a Pull Request to ArcticDB! Please ensure you
have taken a look at:
- ArcticDB's Code of Conduct:
https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md
- ArcticDB's Contribution Licensing:
https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing
-->
  • Loading branch information
ognyanstoimenov authored Jan 15, 2025
1 parent 0c3fcfc commit 6410a72
Show file tree
Hide file tree
Showing 5 changed files with 265 additions and 107 deletions.
Loading

0 comments on commit 6410a72

Please sign in to comment.