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

ZOOKEEPER-4734: FuzzySnapshotRelatedTest becomes flaky when transient disk failure appears #2053

Open
wants to merge 3 commits into
base: branch-3.9
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@
<!-- maven properties -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.outputTimestamp>1691130453</project.build.outputTimestamp>
<dependency.locations.enabled>false</dependency.locations.enabled>
<surefire.version>2.22.1</surefire.version>

Expand Down Expand Up @@ -816,7 +817,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<version>3.6.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -919,12 +920,12 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.1</version>
<version>5.1.9</version>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>2.7.6</version>
<version>2.7.9</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1144,9 +1144,25 @@ public synchronized void start() {
super.start();
}

private static final String LOAD_DATABASE_RETRY = "zookeeper.loadDataBaseRetry";
private static final int DEFAULT_LOAD_DATABASE_MAX_RETRY = 3;

private void loadDataBase() {
try {
zkDb.loadDataBase();
final Integer maxRetry = Integer.getInteger(LOAD_DATABASE_RETRY,
DEFAULT_LOAD_DATABASE_MAX_RETRY);
int numRetries = 0;
while (numRetries < maxRetry) {
try {
zkDb.loadDataBase();
break;
} catch (IOException e) {
if (++numRetries == maxRetry) {
LOG.info("Loading dataset failed times exceeds maxReries:{}, stop retrying.", maxRetry);
throw e;
}
}
}

// load the epochs
long lastProcessedZxid = zkDb.getDataTree().lastProcessedZxid;
Expand Down
Loading