-
Notifications
You must be signed in to change notification settings - Fork 143
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: LongList read from file #16994
fix: LongList read from file #16994
Conversation
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16994 +/- ##
============================================
- Coverage 68.96% 68.95% -0.01%
- Complexity 22763 22770 +7
============================================
Files 2619 2619
Lines 98283 98288 +5
Branches 10185 10185
============================================
+ Hits 67777 67779 +2
- Misses 26675 26677 +2
- Partials 3831 3832 +1
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
…f-its-valid-range-does-not-start-from-0 # Conflicts: # platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
676dd90
to
089bafd
Compare
...dk/swirlds-merkledb/src/test/java/com/swirlds/merkledb/collections/AbstractLongListTest.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListHeap.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListHeap.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Outdated
Show resolved
Hide resolved
...rm-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/AbstractLongList.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Outdated
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListDisk.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
…ts-valid-range-does-not-start-from-0
...dk/swirlds-merkledb/src/test/java/com/swirlds/merkledb/collections/AbstractLongListTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
…ts-valid-range-does-not-start-from-0
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
...rm-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/AbstractLongList.java
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListHeap.java
Show resolved
Hide resolved
platform-sdk/swirlds-merkledb/src/main/java/com/swirlds/merkledb/collections/LongListHeap.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
…ts-valid-range-does-not-start-from-0
Description:
This PR introduces various fixes and improvements to the Long List family and its tests:
LongListHeap
fixes:AbstractLongList
fixes:minValidIndex
,maxValidIndex
, andsize
.Refactoring
AbstractLongList
(and its subclasses):readBodyFromFileChannelOnInit()
and delegated chunk-specific reading to a newreadChunkData()
method in subclasses.Improvements to
AbstractLongListTest
(and its children):AbstractLongListTest#writeReadEmptyList()
had a bug).AbstractLongListTest
(migrated them from child classes).LongListHeap
) can be loaded by another (e.g.,LongListOffHeap
).LongListTest
toLongListAdHocTest
; moved some tests intoAbstractLongListTest
.Notes for reviewers:
LongListDisk#resetTransferBuffer()
in the refactoredAbstractLongListTest
as it seems unnecessary.AbstractLongListTest
to regular tests.Related issue(s):
Fixes #16652
Checklist