-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add unverified blocks root #715
feat: add unverified blocks root #715
Conversation
d6231a3
to
b271aa3
Compare
General note: |
server/src/main/java/com/hedera/block/server/persistence/StreamPersistenceHandlerImpl.java
Show resolved
Hide resolved
...main/java/com/hedera/block/server/persistence/storage/path/BlockAsLocalFilePathResolver.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/persistence/storage/path/UnverifiedBlockPath.java
Show resolved
Hide resolved
69521c7
to
cae09c2
Compare
server/src/main/java/com/hedera/block/server/persistence/StreamPersistenceHandlerImpl.java
Show resolved
Hide resolved
1927c9c
to
f100092
Compare
server/src/main/java/com/hedera/block/server/ack/AckHandlerImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
server/src/main/java/com/hedera/block/server/ack/AckHandlerImpl.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/com/hedera/block/server/persistence/storage/read/BlockAsLocalFileReader.java
Outdated
Show resolved
Hide resolved
322c86a
to
eb6ae49
Compare
eb6ae49
to
4846f68
Compare
- add a new unverified blocks root - persistence will first persist blocks under the unverfied root - after successful persistence under unverified && successful verification, persistence should move the block to live - due to unavaliable critical infrastructure, a method call has to be made to persistence to move the block Signed-off-by: Atanas Atanasov <[email protected]>
4846f68
to
16544bf
Compare
…ll overwrite existing unverified block file Signed-off-by: Atanas Atanasov <[email protected]>
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## main #715 +/- ##
============================================
- Coverage 84.29% 84.21% -0.08%
- Complexity 632 634 +2
============================================
Files 129 130 +1
Lines 2903 2946 +43
Branches 206 206
============================================
+ Hits 2447 2481 +34
- Misses 387 397 +10
+ Partials 69 68 -1
🚀 New features to boost your workflow:
|
@jsync-swirlds @georgi-l95 @AlfredoG87 as a last minute cleanup: 0c9dd45 What I did in this change was to simply remove some redundant (and in a sense wrong, but not wrong in a "this should not happen way", but rather in a "we do not even need to do this, it is redundant" way) logic which would delete if exists the unverified block file. The reason for this is that unverified block files should be rewritable, the writer is agnostic to the decision making as to should/shouldn't it rewrite the contents of an existing unverified block file. It simply always does. Whoever created the writer task is responsible for potential race conditions and/or undesired behavior if two tasks that act upon a single unverified block file (with the same block number) exist and run in parallel. Also, I added a test to assert that the rewrite happens. Simply, whenever we use |
Reviewer Notes
Related Issue(s)
Closes #582