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

Optimize insert/upsert/delete by using get_node_by_key #17765

Merged
merged 2 commits into from Mar 25, 2024

Conversation

emlowe
Copy link
Contributor

@emlowe emlowe commented Mar 21, 2024

Simplify and optimize insert/upsert/delete (and therefore batch_update) by leveraging the newly optimized get_node_by_key instead of querying all the key, value pairs from the DB

This simplifies a bunch of code by eliminating the key,value hint dictionary and removes some test runs that were parameterized on that hint option

@emlowe emlowe added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Mar 21, 2024
@emlowe emlowe changed the title Optimize insert/upsert/delete by using get_node_for_key Optimize insert/upsert/delete by using get_node_by_key Mar 21, 2024
@emlowe emlowe marked this pull request as ready for review March 21, 2024 23:24
@emlowe emlowe requested a review from a team as a code owner March 21, 2024 23:24
Copy link

coveralls-official bot commented Mar 21, 2024

Pull Request Test Coverage Report for Build 8389041888

Details

  • 42 of 45 (93.33%) changed or added relevant lines in 3 files are covered.
  • 26 unchanged lines in 14 files lost coverage.
  • Overall coverage increased (+0.005%) to 90.829%

Changes Missing Coverage Covered Lines Changed/Added Lines %
chia/data_layer/util/benchmark.py 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
chia/_tests/simulation/test_simulation.py 1 96.52%
chia/full_node/full_node_api.py 1 79.32%
chia/data_layer/util/benchmark.py 1 0.0%
chia/server/node_discovery.py 1 80.85%
chia/rpc/wallet_rpc_api.py 1 89.2%
chia/introducer/introducer.py 1 78.26%
chia/_tests/core/util/test_file_keyring_synchronization.py 1 97.1%
chia/_tests/core/util/test_lockfile.py 2 90.69%
chia/full_node/weight_proof.py 2 90.73%
chia/farmer/farmer_api.py 2 94.4%
Totals Coverage Status
Change from base Build 8378992295: 0.005%
Covered Lines: 97374
Relevant Lines: 107183

💛 - Coveralls

Copy link
Contributor

File Coverage Missing Lines
chia/data_layer/util/benchmark.py 0.0% lines 9, 72, 89
Total Missing Coverage
45 lines 3 lines 93%

Copy link
Collaborator

@altendky altendky left a comment

Choose a reason for hiding this comment

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

quite a lot simpler, thanks!

@emlowe emlowe added the ready_to_merge Submitter and reviewers think this is ready label Mar 25, 2024
@pmaslana pmaslana merged commit f5aa40a into main Mar 25, 2024
289 of 290 checks passed
@pmaslana pmaslana deleted the EL.dl-insert-optimize branch March 25, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog ready_to_merge Submitter and reviewers think this is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants