-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-6961. [Snapshot] Bootstrapping slow followers/new followers. #3980
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
Merged
Merged
Changes from all commits
Commits
Show all changes
130 commits
Select commit
Hold shift + click to select a range
797bd77
initial changes with noCopyList
0cc7a2b
added files to tarball
b386cd4
added test
9e19ff9
basics working
2dda59c
cleanup
bfd3054
basically working
245c740
fix original tests
c7c5b62
added create snapshot
0c242f4
added checkpoint test
fd5ce9b
added link file test
b143565
cleanup
a402d14
fixed scm checkpoint tests
af55d3f
reformatted for backwards compatibilty
77e0b02
cleanup
8d8fa65
cleanup starting slash
879695f
cleanup
354b280
cleanup
045b701
cleanup
407d9b1
added duration
31a048c
getSnapshotPath()
16968e6
checks dummy file count
713dcad
checkstyle
25cdbd1
fixed snapshotDirName
e329e8d
cleanup
6975c1a
follower installs snapshot tarball
a1ee873
cleanup
e662710
refactored hardlink handling
1ff9d66
hard link test working
357c1e2
cleanup
4948396
sleep for double buffer
0caf85b
cleanup
91f0a90
cleanup
8d8d521
cleanup
ba6b649
checkstyle
c3eb22b
findbugs
c3e6e41
includeSnapshotData initally working
71782b0
inc timeout
8acbc07
added test for includeSnapshotData is false
aee7bbf
renamed OzoneManagerSnapshotProvider
0c37119
checkstyle
2573caf
added package info
93fb5cf
fixed import
dc2b7b2
findbugs
f07cfef
removed make dbDir
43dadbb
restructured to pull in all of snapshot dir
bf0511a
added checkpoint state dir
ee3457f
fixed up directories
0954bba
restructured tarball to include all of snapshot dir
1cd5275
cleanup
d229f28
cleanup
7f175ee
cleanup hardlink test
793cea2
rebase cleanup
75beaf6
cleanup
07eac3b
cleanup
c4f8157
removed pom.xml/differ changes
fa3e691
fixed intellij warnings
58f5103
checkstyle
cbf14af
comments
474aaf7
trigger new CI check
9cb92c4
Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/…
GeorgeJahad 7825c96
Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/…
GeorgeJahad 1953d80
Update hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/…
GeorgeJahad f5a4a95
Update hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozo…
GeorgeJahad 9aace54
Update hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozo…
GeorgeJahad b91843b
cleanup comments
09ab4ea
cleanup
16c3cf4
cleanup
e3a2921
Skips unexpected snapshot directories
d711d9a
checkstyle
5004374
findbugs
f9a26d1
Merge remote-tracking branch 'origin/HDDS-6517-Snapshot' into bootstr…
ab05184
fixed for updated directory structure
20cb141
Merge remote-tracking branch 'origin/master' into bootstrapMasterMerge2
0b0abbd
merge cleanup
a900c65
bootstrapStateLock
9e9700d
fixed snapshot dir in tests
b4f1afd
cleanup bootstrapLock
65e4873
Merge remote-tracking branch 'origin/master' into bootstrapMasterMerge3
61da276
changed to BootstrapStateHandler
ba4df8d
only allow single compaction log at a time
da44dc2
updated OMDBCheckpointServlet with bootstrap locks
993e51c
moved instance count to differ
80ca988
now tests stops metadataManager
1419e98
checkStyle
eeb35b9
checkstyle
3a8589a
initial lock test
2e76dd8
more lock tests
cc29251
clean up
eb4002c
checkstyle
bf82a4f
Merge branch 'master' into HDDS-6961
GeorgeJahad 62c4f02
split the bootstrap state changes into separate PR.
76796ff
checkstyle
74b800a
Merge remote-tracking branch 'origin/master' into bootstrapMerge0216
d7a66bc
checkstyle
b8384c4
fix directory
ed069f0
checkstyle
3eda75a
Merge remote-tracking branch 'origin/master' into newBootstrap
ab15ef0
merge cleanup
fc6549e
Apply suggestions from code review
GeorgeJahad 8c32c5b
checkstyle
f0e790d
findbugs
a24709e
findbugs
b684796
fixed streams
5241b11
Merge remote-tracking branch 'origin/master' into bootstrapMerge0320
9f81428
fix merge
7c60c53
now uses RDBCheckpointManager.waitForCheckpointDirectoryExist
c06b404
more hard link tests
9f93f50
parameterize snapshot e2e test
4f4c77a
fix test for restructured directory
68bbbd1
added parameterized tests
068a1bb
removed parameterized test
6e4c317
now compares hardlinks with leader
bc83526
fixed test to only check leader
f77b4d6
checkstyle
051b97b
checkstyle
dbcaae9
Apply suggestions from code review
GeorgeJahad bb6e09f
more review changes
ab25e93
Merge remote-tracking branch 'origin/master' into bootstrapTest3
b7ede37
refactoring based on review comments
2bb1fa5
fix alignment
8d33bb4
moved waitForCheckpointDirectoryExist into utils class
0212d2f
checkstyle
992f4d4
checkstyle
79b8936
fixed comment
27c5a9a
trigger new CI check
d94e406
checkstyle
59b5e52
fix checkstyle and TestOMSnapshotDAG
a519cdc
Merge remote-tracking branch 'origin/master' into bootstrapTest4
855d16d
Merge remote-tracking branch 'origin/master' into bootstrapTest5
49dcc6e
trigger new CI check
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
70 changes: 70 additions & 0 deletions
70
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBCheckpointUtils.java
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.hadoop.hdds.utils.db; | ||
|
|
||
| import org.awaitility.core.ConditionTimeoutException; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| import java.io.File; | ||
| import java.io.IOException; | ||
| import java.time.Duration; | ||
| import java.time.Instant; | ||
|
|
||
| import static org.awaitility.Awaitility.with; | ||
|
|
||
| /** | ||
| * RocksDB Checkpoint Utilities. | ||
| */ | ||
| public final class RDBCheckpointUtils { | ||
| static final Logger LOG = | ||
| LoggerFactory.getLogger(RDBCheckpointUtils.class); | ||
| private static final Duration POLL_DELAY_DURATION = Duration.ZERO; | ||
| private static final Duration POLL_INTERVAL_DURATION = Duration.ofMillis(100); | ||
| private static final Duration POLL_MAX_DURATION = Duration.ofSeconds(5); | ||
|
|
||
| private RDBCheckpointUtils() { } | ||
|
|
||
| /** | ||
| * Wait for checkpoint directory to be created for 5 secs with 100 millis | ||
| * poll interval. | ||
| * @param file Checkpoint directory. | ||
| * @return true if found. | ||
| */ | ||
| public static boolean waitForCheckpointDirectoryExist(File file) | ||
| throws IOException { | ||
| Instant start = Instant.now(); | ||
| try { | ||
| with().atMost(POLL_MAX_DURATION) | ||
| .pollDelay(POLL_DELAY_DURATION) | ||
| .pollInterval(POLL_INTERVAL_DURATION) | ||
| .await() | ||
| .until(file::exists); | ||
| LOG.info("Waited for {} milliseconds for checkpoint directory {}" + | ||
| " availability.", | ||
| Duration.between(start, Instant.now()).toMillis(), | ||
| file.getAbsoluteFile()); | ||
| return true; | ||
| } catch (ConditionTimeoutException exception) { | ||
| LOG.info("Checkpoint directory: {} didn't get created in 5 secs.", | ||
| file.getAbsolutePath()); | ||
| return false; | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.