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

Fix delete snapshot so that it doesn't orphan data keys or delete the wrong key #1973

Merged
merged 6 commits into from
Nov 5, 2024

Conversation

vasil-pashov
Copy link
Collaborator

@vasil-pashov vasil-pashov commented Nov 1, 2024

Reference Issues/PRs

Fixes: #1958
Fixes: #1863

What does this implement or fix?

  • Fix orphaned keys. recurse_index_keys does not assume that the all
    atom keys are for the same stream id anymore
  • Fix AggregationClause::process vector iterator invalidation. Not
    related to the issue but C++ were crashing at runtime because of this.
    Calling erase invalidates the iterator in a loop.

Any other comments?

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?

poodlewars and others added 3 commits October 30, 2024 12:59
* Fix orphaned keys. recurse_index_keys does not assume that the all
  atom keys are for the same stream id anymore
* Fix AggregationClause::process vector iterator invalidation. Not
  related to the issue but C++ were crashing at runtime because of this.
  Calling erase invalidates the iterator in a loop.
… keys with more than one symbols in the snapshot
@vasil-pashov vasil-pashov changed the title Fix 1863 Fix delete snapshot so that it doesn't orphan data keys or delete the wrong key Nov 1, 2024
Copy link
Collaborator

@poodlewars poodlewars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks correct to me, could you share the results of repeating the benchmark from the AtomKeyPacked PR?

@vasil-pashov
Copy link
Collaborator Author

vasil-pashov commented Nov 4, 2024

Results of running time -v for the new change

       Prune took 1.9612538814544678s

	Command being timed: "python -m pytest /home/vasil/Documents/source/ArcticDB/python/tests/integration/arcticdb/version_store/test_snapshot.py::test_prune_previous_memory_usage"
	User time (seconds): 46.35
	System time (seconds): 10.89
	Percent of CPU this job got: 82%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 1:09.31
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 1375964
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 1
	Minor (reclaiming a frame) page faults: 4926581
	Voluntary context switches: 228693
	Involuntary context switches: 57025
	Swaps: 0
	File system inputs: 0
	File system outputs: 3706960
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

@vasil-pashov vasil-pashov merged commit 50f1d04 into master Nov 5, 2024
126 of 127 checks passed
@vasil-pashov vasil-pashov deleted the fix-1863 branch November 5, 2024 09:31
grusev pushed a commit that referenced this pull request Nov 25, 2024
… wrong key (#1973)

#### Reference Issues/PRs
Fixes: #1958
Fixes: #1863
#### What does this implement or fix?

* Fix orphaned keys. recurse_index_keys does not assume that the all
  atom keys are for the same stream id anymore
* Fix AggregationClause::process vector iterator invalidation. Not
  related to the issue but C++ were crashing at runtime because of this.
  Calling erase invalidates the iterator in a loop.

#### 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
-->

---------

Co-authored-by: Alex Seaton <[email protected]>
Co-authored-by: Vasil Pashov <[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
3 participants