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

Feature/shard path multiplexing #3463

Closed

Conversation

undertome
Copy link
Contributor

@undertome undertome commented Jun 27, 2020

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.

@undertome undertome force-pushed the feature/shard-path-multiplexing branch from be33a9b to b70ad9d Compare July 3, 2020 22:43
@undertome undertome mentioned this pull request Jul 10, 2020
Copy link

@ghost ghost left a 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.

@carlhua carlhua assigned cjcobb23 and seelabs and unassigned ximinez Jul 17, 2020
@undertome undertome requested a review from seelabs July 21, 2020 17:57
Copy link
Collaborator

@seelabs seelabs left a 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.

@undertome undertome force-pushed the feature/shard-path-multiplexing branch from 4b5a6c0 to 5bb6a64 Compare July 28, 2020 22:16
@undertome undertome force-pushed the feature/shard-path-multiplexing branch from 2625285 to fce3310 Compare July 29, 2020 22:15
@undertome undertome force-pushed the feature/shard-path-multiplexing branch 3 times, most recently from 56804d9 to 157ed88 Compare August 11, 2020 16:07
@ximinez
Copy link
Collaborator

ximinez commented Aug 11, 2020

@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!

@undertome
Copy link
Contributor Author

@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!

Copy link
Collaborator

@seelabs seelabs left a 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.

Copy link
Collaborator

@seelabs seelabs left a 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!

@undertome undertome force-pushed the feature/shard-path-multiplexing branch from 6559199 to 37b7d29 Compare August 13, 2020 16:19
@carlhua carlhua assigned ximinez and unassigned cjcobb23 Aug 17, 2020
Copy link
Collaborator

@ximinez ximinez left a 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.

Copy link
Collaborator

@seelabs seelabs left a 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.

@undertome
Copy link
Contributor Author

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.

@ximinez
Copy link
Collaborator

ximinez commented Aug 19, 2020

@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

Copy link
Collaborator

@seelabs seelabs left a 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.

@undertome undertome added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Aug 19, 2020
* Distinguish between recent and historical shards
* Allow multiple storage paths for historical shards
* Add documentation for this feature
* Add unit tests
@undertome undertome force-pushed the feature/shard-path-multiplexing branch from b834b56 to c5d7214 Compare August 19, 2020 16:40
@nbougalis nbougalis mentioned this pull request Sep 1, 2020
// 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);

Copy link
Contributor

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());
Copy link
Contributor

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()};
Copy link
Contributor

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().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants