Add a configurable parameter to the number of backup attempts that are made.#1
Merged
tglman merged 4 commits intoorientechnologies:3.2.xfrom Feb 10, 2026
Merged
Conversation
…s attempted using a configurable parameter. This it to prevent the situation where the server gets in an endless loop of retrying to succesful make a backup that fails, filling up the backup log with entries.
tglman
requested changes
Feb 10, 2026
Member
tglman
left a comment
There was a problem hiding this comment.
This looks good, there are few small changes, but done this can be merged
| </parent> | ||
| <groupId>com.orientechnologies</groupId> | ||
| <artifactId>agent</artifactId> | ||
| <version>3.2.50-SNAPSHOT</version> |
| <parent> | ||
| <groupId>com.orientechnologies</groupId> | ||
| <artifactId>orientdb-parent</artifactId> | ||
| <version>3.2.50-SNAPSHOT</version> |
| </parent> | ||
| <groupId>com.orientechnologies</groupId> | ||
| <artifactId>orientdb-enterprise-parent</artifactId> | ||
| <version>3.2.50-SNAPSHOT</version> |
| error.setStackTrace(sw.toString()); | ||
|
|
||
| // Add retry count if listener is OBackupTask | ||
| if (listener instanceof OBackupTask) { |
Member
There was a problem hiding this comment.
Instead of specific casting here, maybe is better to refactor the doBackup method and add the retry count for logging
| () -> { | ||
| try { | ||
| final long start = tickStart(); | ||
| strategy.doBackup(OBackupTask.this); |
Member
There was a problem hiding this comment.
In this case should be possible to pass the retry as parameter, and modify also the schedule method for pass the 0 as retry count
Author
|
I have applied the requested changes. Please take another look when you get a chance. |
Member
|
Hi, just shipped 3.2.50 with this fix |
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
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.
Currently, if the backup fails for some reason, the server can get into a situation where it continuously schedules another backup to take place that can potentially fill up the backup log with entries. Here is example output from a server that is configured to perform backups every so often. When the backup fails, the server schedules another backup event to take place immediately. This behavior was present in 3.2.47.
Added support for limiting the number of times that a failed backup is attempted using a configurable parameter. This it to prevent the situation where the server gets in an endless loop of retrying to succesful make a backup that fails, filling up the backup log with entries. Here is the output of the same situation using the fixes suggested with this pull request. After 3 attempts, the server quits trying to make the backup.