Skip to content

Conversation

@vinayakphegde
Copy link
Contributor

This PR introduces validation to prevent the deletion of backups that are essential for Point-In-Time Recovery (PITR). If a backup is the only remaining full backup enabling PITR for certain tables, deletion will be blocked unless the force option is explicitly specified.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm. A few comments.

}

// Check if another valid full backup exists for this table
long finalPitrMaxStartTime = pitrMaxStartTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to introduce this new variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise we'll get this error: Variable used in lambda expression should be final or effectively final

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Make it final then.

final long finalPitrMaxStartTime = pitrMaxStartTime;

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. just a nitpick.

}

// Check if another valid full backup exists for this table
long finalPitrMaxStartTime = pitrMaxStartTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Make it final then.

final long finalPitrMaxStartTime = pitrMaxStartTime;

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.


// Check if another valid full backup exists for this table
List<BackupInfo> backupHistory = backupSystemTable.getBackupInfos(BackupState.COMPLETE);
final long finalPitrMaxStartTime = pitrMaxStartTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: declare pitrMaxStartTime as a final MutableLong, then no need to use extra variable here.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ HBASE-28957 Compile Tests _
+1 💚 mvninstall 4m 15s HBASE-28957 passed
+1 💚 compile 1m 9s HBASE-28957 passed
+1 💚 checkstyle 0m 22s HBASE-28957 passed
+1 💚 spotbugs 0m 40s HBASE-28957 passed
+1 💚 spotless 0m 53s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 13s the patch passed
+1 💚 compile 0m 56s the patch passed
+1 💚 javac 0m 56s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 16s the patch passed
+1 💚 spotbugs 0m 51s the patch passed
+1 💚 hadoopcheck 14m 5s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚 spotless 0m 51s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
37m 21s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6848/6/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #6848
JIRA Issue HBASE-29210
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux bb3ae20e3c15 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-28957 / 821f57b
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 87 (vs. ulimit of 30000)
modules C: hbase-backup U: hbase-backup
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6848/6/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 29s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ HBASE-28957 Compile Tests _
+1 💚 mvninstall 3m 31s HBASE-28957 passed
+1 💚 compile 0m 20s HBASE-28957 passed
+1 💚 javadoc 0m 16s HBASE-28957 passed
+1 💚 shadedjars 6m 0s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 5s the patch passed
+1 💚 compile 0m 19s the patch passed
+1 💚 javac 0m 19s the patch passed
+1 💚 javadoc 0m 13s the patch passed
+1 💚 shadedjars 5m 52s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌ unit 21m 53s /patch-unit-hbase-backup.txt hbase-backup in the patch failed.
43m 12s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6848/6/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #6848
JIRA Issue HBASE-29210
Optional Tests javac javadoc unit compile shadedjars
uname Linux 32ba1b1f9814 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-28957 / 821f57b
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6848/6/testReport/
Max. process+thread count 3633 (vs. ulimit of 30000)
modules C: hbase-backup U: hbase-backup
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6848/6/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@wchevreuil wchevreuil merged commit 01ff3de into apache:HBASE-28957 Apr 10, 2025
1 check failed
anmolnar pushed a commit that referenced this pull request Jul 28, 2025
vinayakphegde added a commit to vinayakphegde/hbase that referenced this pull request Jul 29, 2025
vinayakphegde added a commit to vinayakphegde/hbase that referenced this pull request Jul 29, 2025
anmolnar pushed a commit that referenced this pull request Sep 11, 2025
anmolnar pushed a commit that referenced this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants