-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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/shard path multiplexing #3463
Conversation
be33a9b
to
b70ad9d
Compare
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.
I compiled, test run, and studied part of code related to Deterministic shards. Looks good.
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.
Nice job on this! I left some comments to consider.
4b5a6c0
to
5bb6a64
Compare
2625285
to
fce3310
Compare
56804d9
to
157ed88
Compare
@undertome In the future, please do not rewrite history and force push a single commit over and over. Instead, add additional commits onto your branch, starting the commit message with "[FOLD]" to indicate that these commits will need to be squashed once the PR is passed or merged. This makes my job as reviewer exponentially more manageable for several reasons, including I can confirm that you addressed all issues, I can see precisely what changed since the last time I looked at the PR, and I can focus on those changes and lower the risk of missing something that gets "buried" in the original change set. Thanks! |
Sure thing! |
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.
Left a few comments for consideration.
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.
Left some additional comments, but nothing that should hold this up (although the clang format issue does need to be resolved). 👍 Great job on this!
6559199
to
37b7d29
Compare
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.
One oversight, but otherwise, I think I'm good.
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.
Looks like there's an issue with the VS build:
(WarnCompileDuplicatedFilename target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(944,5): warning MSB8027: Two or more files with the name of Manifest.cpp will produce outputs to the same location. This can lead to an incorrect build result. The files involved are C:\Users\travis\build\ripple\rippled\src\ripple\app\misc\impl\Manifest.cpp, C:\Users\travis\build\ripple\rippled\src\ripple\rpc\handlers\Manifest.cpp. [C:\Users\travis\build\ripple\rippled\build.ms\rippled.vcxproj]
We've run into similar issues in the past and have solved it by renaming one of the files.
Let's address this in a separate PR since this one didn't change those files. |
@seelabs I think that error is a non-fatal warning, and the actual CI failure was due to Travis being Travis. When I rebuilt that step, it succeeded. https://travis-ci.com/github/ripple/rippled/jobs/375010094 |
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.
👍 Remarking this as approved. The duplicate file name issue was not created in this patch.
* Distinguish between recent and historical shards * Allow multiple storage paths for historical shards * Add documentation for this feature * Add unit tests
b834b56
to
c5d7214
Compare
// Get the available storage for each historical path | ||
std::for_each( | ||
historicalPaths_.begin(), | ||
historicalPaths_.end(), | ||
[&capacities](boost::filesystem::path const& path) { | ||
capacities.push_back( | ||
boost::filesystem::space(path).available); | ||
|
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.
Compile error, uniqueCapacities
isn't captured on non Linux.
uniqueCapacities.end()) | ||
{ | ||
uniqueCapacities[availableSpace].push_back( | ||
path.to_string()); |
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.
Compile error, to_string()
isn't a class function, use string()
.
path.to_string()); | ||
} | ||
else | ||
uniqueCapacities[availableSpace] = {path.to_string()}; |
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.
Compile error, to_string()
isn't a class function, use string()
.
This PR introduces changes that allow a user to specify multiple paths for storing historical shards. The changes are based in the
DatabaseShardImp
class and in the shards unit tests. Please read the documentation to get an idea of the changes involved.