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: recordCache to commit added entries and implemented correctly the remove elements from the queue #10523

Conversation

povolev15
Copy link
Contributor

@povolev15 povolev15 commented Dec 14, 2023

[fix recordCache to commit added entries](fix: recordCache to commit added entries and implemented correctly the remove elements from the queue)

Related issue(s):

Fixes #10403
Fixes #10170

Copy link

github-actions bot commented Dec 14, 2023

Node: HAPI Test (Time Consuming) Results

20 tests  ±0   17 ✔️ ±0   44m 49s ⏱️ -15s
  2 suites ±0     3 💤 ±0 
  2 files   ±0     0 ±0 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 14, 2023

Node: Unit Test Results

    2 293 files  ±0      2 293 suites  ±0   51m 56s ⏱️ + 4m 19s
118 640 tests ±0  118 605 ✔️ ±0  35 💤 ±0  0 ±0 
127 057 runs  ±0  127 022 ✔️ ±0  35 💤 ±0  0 ±0 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 14, 2023

Node: E2E Test Results

    1 files  ±    0      1 suites  ±0   22m 44s ⏱️ + 22m 44s
311 tests +310  311 ✔️ +311  0 💤 ±0  0  - 1 
333 runs  +332  333 ✔️ +333  0 💤 ±0  0  - 1 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

This pull request removes 1 and adds 311 tests. Note that renamed tests count towards both.
EndToEndTests ‑ initializationError
EndToEndTests ‑ ADDRESS_BOOK_CONTROLCanUpdateADDRESS_BOOK
EndToEndTests ‑ ADDRESS_BOOK_CONTROLCanUpdateNODE_DETAILS
EndToEndTests ‑ AccountsGetPayerRecordsIfSoConfigured
EndToEndTests ‑ Acct57CanMakeSmallChanges
EndToEndTests ‑ Acct57CantMakeLargeChanges
EndToEndTests ‑ AddingSignaturesToExecutedTxFails
EndToEndTests ‑ AddingSignaturesToExecutedTxFailsWithLongTermEnabled
EndToEndTests ‑ AddingSignaturesToNonExistingTxFails
EndToEndTests ‑ AddingSignaturesToNonExistingTxFailsWithLongTermEnabled
EndToEndTests ‑ AddressAliasIdFuzzing
…

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (b5574b1) 62.78% compared to head (1fb36db) 62.79%.

Files Patch % Lines
...ra/node/app/state/recordcache/RecordCacheImpl.java 50.00% 9 Missing and 2 partials ⚠️
.../hedera/node/app/spi/validation/TruePredicate.java 0.00% 3 Missing ⚠️
...m/hedera/node/app/spi/records/BlockRecordInfo.java 0.00% 1 Missing ⚠️
...era/node/app/records/impl/BlockRecordInfoImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #10523   +/-   ##
==========================================
  Coverage      62.78%   62.79%           
- Complexity     30938    30941    +3     
==========================================
  Files           3380     3382    +2     
  Lines         136732   136736    +4     
  Branches       14249    14249           
==========================================
+ Hits           85852    85857    +5     
+ Misses         47481    47476    -5     
- Partials        3399     3403    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Dec 14, 2023

Node: Integration Test Results

293 tests  ±0   293 ✔️ ±0   1h 3m 39s ⏱️ -15s
    5 suites ±0       0 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

♻️ This comment has been updated with latest results.

@povolev15 povolev15 force-pushed the 10403-RecordCacheImpl-fails-to-remove-expired-transactions branch from 3476177 to 9a5700b Compare December 15, 2023 01:32
Copy link

github-actions bot commented Dec 15, 2023

Node: HAPI Test (Token) Results

189 tests  ±0   189 ✔️ ±0   16m 1s ⏱️ -42s
  13 suites ±0       0 💤 ±0 
  13 files   ±0       0 ±0 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 15, 2023

Node: HAPI Test (Crypto) Results

211 tests  ±0   209 ✔️ +1   21m 8s ⏱️ + 4m 35s
  22 suites ±0       2 💤 ±0 
  22 files   ±0       0  - 1 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

This pull request skips 1 and un-skips 1 tests.
com.hedera.services.bdd.suites.crypto.RandomOps ‑ freezeDemo
com.hedera.services.bdd.suites.crypto.TxnReceiptRegression ‑ receiptUnavailableAfterCacheTtl

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 15, 2023

Node: HAPI Test (Smart Contract) Results

411 tests  ±0   402 ✔️ ±0   50m 2s ⏱️ + 2m 29s
  55 suites ±0       9 💤 ±0 
  55 files   ±0       0 ±0 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 15, 2023

Node: HAPI Test (Misc) Results

422 tests  ±0   357 ✔️ +1   28m 21s ⏱️ +27s
  73 suites ±0     65 💤 ±0 
  73 files   ±0       0  - 1 

Results for commit 1fb36db. ± Comparison against base commit b5574b1.

♻️ This comment has been updated with latest results.

@povolev15 povolev15 changed the title fix: recordCache to commit added entries fix: recordCache to commit added entries and implemented correctly the remove elements from the queue Dec 15, 2023
jsync-swirlds
jsync-swirlds previously approved these changes Dec 15, 2023
Copy link
Member

@jsync-swirlds jsync-swirlds left a comment

Choose a reason for hiding this comment

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

One possible improvement, but not required.

@jsync-swirlds jsync-swirlds marked this pull request as ready for review December 18, 2023 16:16
@jsync-swirlds jsync-swirlds requested review from a team as code owners December 18, 2023 16:16
@jsync-swirlds jsync-swirlds force-pushed the 10403-RecordCacheImpl-fails-to-remove-expired-transactions branch from 4f8924c to fd6bbd0 Compare December 18, 2023 17:07
@jsync-swirlds jsync-swirlds force-pushed the 10403-RecordCacheImpl-fails-to-remove-expired-transactions branch from fd6bbd0 to 82b36d6 Compare December 18, 2023 17:20
jsync-swirlds
jsync-swirlds previously approved these changes Dec 18, 2023
mhess-swl
mhess-swl previously approved these changes Dec 19, 2023
…s from history correctly

Fix record cache to commit added entries to the queue state
   Ensure the record cache will also remove entries from the queue state when expired
   Created a "TruePredicate" class for when we require a predicate, but it should always be true, so we avoid duplicating the code yet again.
      This was needed for removing the head item from the queue state.
Fix record cache to remove entries from histories when expired
Fix tests as needed
Adjust comments to match design and clarify the History map semantics.

Signed-off-by: Lev Povolotsky <lev@swirldslabs.com>
Signed-off-by: Joseph Sinclair <joseph.sinclair@swirldslabs.com>
@jsync-swirlds jsync-swirlds force-pushed the 10403-RecordCacheImpl-fails-to-remove-expired-transactions branch from 82b36d6 to 5a131fe Compare December 19, 2023 21:38
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Copy link
Collaborator

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

LGTM!

@tinker-michaelj tinker-michaelj merged commit 7534e43 into develop Dec 31, 2023
41 of 42 checks passed
@tinker-michaelj tinker-michaelj deleted the 10403-RecordCacheImpl-fails-to-remove-expired-transactions branch December 31, 2023 00:09
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.

RecordCacheImpl fails to remove expired transactions Memory leak in RecordCacheImpl
5 participants