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: 15438: Eliminate busy loop in HalfDiskHashMap.endWriting() #15439

Merged
merged 6 commits into from
Sep 17, 2024

Conversation

artemananiev
Copy link
Member

Fix summary:

  • HDHM.endWriting() is reimplemented using fork-join pool and tasks
  • No new unit tests are introduced, since endWriting() is well covered by existing tests

Fixes: #15438
Signed-off-by: Artem Ananev artem.ananev@swirldslabs.com

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
@artemananiev artemananiev added Tech Debt Reduced Issues which reduce technical debt. Performance Issues related to performance concerns. Platform Virtual Map Platform Data Structures Platform Tickets pertaining to the platform labels Sep 11, 2024
@artemananiev artemananiev added this to the v0.55 milestone Sep 11, 2024
@artemananiev artemananiev self-assigned this Sep 11, 2024
@artemananiev artemananiev requested review from a team as code owners September 11, 2024 17:44
Copy link

codacy-production bot commented Sep 11, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.02% (target: -1.00%) 87.07%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7a4616b) 108968 67303 61.76%
Head commit (9aa566d) 109124 (+156) 67426 (+123) 61.79% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#15439) 116 101 87.07%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 82.75862% with 20 lines in your changes missing coverage. Please review.

Project coverage is 58.25%. Comparing base (7a4616b) to head (9aa566d).
Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
...wirlds/merkledb/files/hashmap/HalfDiskHashMap.java 82.75% 15 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #15439      +/-   ##
=============================================
+ Coverage      58.22%   58.25%   +0.02%     
- Complexity     21573    21599      +26     
=============================================
  Files           2779     2781       +2     
  Lines         109151   109325     +174     
  Branches       11163    11181      +18     
=============================================
+ Hits           63554    63686     +132     
- Misses         41738    41774      +36     
- Partials        3859     3865       +6     
Files with missing lines Coverage Δ
...va/com/swirlds/merkledb/config/MerkleDbConfig.java 92.30% <ø> (ø)
...wirlds/merkledb/files/hashmap/HalfDiskHashMap.java 74.70% <82.75%> (-0.94%) ⬇️

... and 35 files with indirect coverage changes

Impacted file tree graph

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
OlegMazurov
OlegMazurov previously approved these changes Sep 13, 2024
Copy link
Contributor

@OlegMazurov OlegMazurov left a comment

Choose a reason for hiding this comment

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

Pending performance testing.

imalygin
imalygin previously approved these changes Sep 16, 2024
…le CPUs

Signed-off-by: Artem Ananev <artem.ananev@swirldslabs.com>
@artemananiev artemananiev merged commit 0a3e84c into develop Sep 17, 2024
45 of 46 checks passed
@artemananiev artemananiev deleted the 15438-D-hdhm-endwriting-busy-loop branch September 17, 2024 19:24
netopyr added a commit that referenced this pull request Sep 19, 2024
* develop: (22 commits)
  test: New HAPI test for TokenAirdrop transaction (#15348)
  test: unit test verifySyncInvalidEd25519() is not stable (#15534)
  chore: add `TracerBinding` interface for `TransactionExecutors`. (#15480)
  chore: Add missing javadocs in Consensus Service (#15299)
  fix: Validate `CustomFees` input arrays in `UpdateTokenCustomFeesDecoder` (#15520)
  feat: migrate event serialization to protobuf (#15417)
  fix: 15494: Improve VirtualLeafRecord serialization to bytes during flushes (#15512)
  docs: tss block signing proposal (#15160)
  fix: 15438: Eliminate busy loop in HalfDiskHashMap.endWriting() (#15439)
  build: cleanup settings.gradle.kts / remove build.gradle.kts (#15470)
  test: fix CryptographyTests (#15529)
  fix: recreate block hash from state (#15444)
  docs: Proposal Process Update - Specify post-acceptance non-material update procedure (#15447)
  chore: testnet event hashing (#15432)
  fix: 15167: Remove timeout from reconnect/rehash Iterators (#15468)
  chore: remove snapshot ops (#15462)
  feat: Add TokenUpdateNFTs as a smart contract operation v2 (#15445)
  feat: introduce PbjRecordHasher and RosterUtils.hash(Roster) (#15457)
  fix: Precision loss for gas calculation of HTS system contracts v2 (#15446)
  chore: correct the variable name in roster.proto (#15465)
  ...

# Conflicts:
#	hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/scope/HandleHederaOperations.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Issues related to performance concerns. Platform Data Structures Platform Virtual Map Platform Tickets pertaining to the platform Tech Debt Reduced Issues which reduce technical debt.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate busy loop in HalfDiskHashMap.endWriting()
4 participants