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
Feature/segment storage improvement #399
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killme2008
force-pushed
the
feature/segment-storage-improvement
branch
from
February 18, 2020 17:52
2fee163
to
938c808
Compare
…re-allocate segments.
killme2008
force-pushed
the
feature/segment-storage-improvement
branch
from
February 26, 2020 11:35
50e9925
to
7fd7ce2
Compare
killme2008
changed the title
[WIP] Feature/segment storage improvement
Feature/segment storage improvement
Feb 26, 2020
It's ready for review. @fengjiachun @zongtanghu @masaimu @SteNicholas . Main changes:
|
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/LogManagerImpl.java
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/AbortFile.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/CheckpointFile.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/CheckpointFile.java
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/RocksDBSegmentLogStorage.java
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/RocksDBSegmentLogStorage.java
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 2, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Outdated
Show resolved
Hide resolved
fengjiachun
reviewed
Mar 3, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/log/SegmentFile.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
SteNicholas
reviewed
Mar 4, 2020
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
/** | ||
* wait for all sub jobs finish. |
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.
wait -> Wait
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Platform.java
Outdated
Show resolved
Hide resolved
SteNicholas
approved these changes
Mar 4, 2020
fengjiachun
approved these changes
Mar 4, 2020
zongtanghu
pushed a commit
that referenced
this pull request
Apr 28, 2020
* (fix) RocksDBSegmentLogStorage can't be read when sync is false * (feat) Impl concurrent writing for segment log storage * (feat) use segment log storage as default log storage * (fix) forgot to reset diskId after loading snapshot * (feat) tweak RocksDBSegmentLogStorage * (feat) refactor RocksDBSegmentLogStorage: use a new data format and pre-allocate segments. * (feat) Adds LogManagerWithSegmentLogStorageTest * (feat) Named SegmentAllocator thread * (fix) example log * (feat) tweak test parameters and warn when using RocksDBSegmentLogStorage on mac * (feat) make write executor configurable * (feat) warmup segments for test * (fix) stackoverflow when fsm caller is overload * (feat) Impl segment swap in/out * (fix) panic when RocksDBSegmentLogStorage#onTruncateSuffix log not found. * (feat) remove mlock,because it has oom risk * (feat) use filename in checkpoint instead of absolute path * (feat) use RocksDBLogStorage as default log storage * (feat) Destroy segment file out of lock * (feat) minor changes by CR. * (feat) Introduce WriteContext to wrap CountDownEvents * (fix) typo * (feat) minor changes by CR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
RocksDBSegmentLogStorage improvements. #316
Modification:
It's ready for review. @fengjiachun @zongtanghu @masaimu @SteNicholas .
Main changes:
SegmentFile
file comment), so it's not compilable with old versions.Because this log storage is experimental in old versions, i think it's acceptable.LogManager
after snapshot is loaded.RocksDBSegmentLogStorage#truncateSuffix
throws exception when log not found.Result:
Fixes #316.