Skip to content

Conversation

@droudnitsky
Copy link
Contributor

@droudnitsky droudnitsky commented Oct 19, 2025

https://issues.apache.org/jira/browse/HBASE-29672

There is a large class of filters:

RowFilter
ValueFilter
QualifierFilter
FamilyFilter
DependentColumnFilter
ColumnValueFilter
SingleColumnValueFilter
SingleColumnValueExcludeFilter

Which take a ByteArrayComparable comparator as an argument (e.g BinaryComparator, RegexStringComparator, BinaryComponentComparator) and apply the given comparator at query runtime on the server. Due to filter misconfiguration/data shape/comparator bugs, a comparator may throw a runtime exception which filters are not currently handling. In this case the runtime exception gets propagated all the way up the call stack, leading to an unexpected throwable at the topmost RpcServer layer and a very unclear remote exception on the client with a very long mysterious server exception trace.

We should handle comparison runtime exceptions and treat them as HBaseIOException, and propagate a clear exception message to the client. This will also lets us handle cases where we know that a client retry is guaranteed to fail and let us prevent bad requests from being excessively retried (such as HBASE-29654).

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 3m 2s 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 _
_ master Compile Tests _
+1 💚 mvninstall 3m 47s master passed
+1 💚 compile 0m 31s master passed
+1 💚 javadoc 0m 21s master passed
+1 💚 shadedjars 6m 25s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 10s the patch passed
+1 💚 compile 0m 22s the patch passed
+1 💚 javac 0m 22s the patch passed
+1 💚 javadoc 0m 17s the patch passed
+1 💚 shadedjars 6m 15s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 1m 32s hbase-client in the patch passed.
26m 44s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7397
Optional Tests javac javadoc unit compile shadedjars
uname Linux f96aeec0da33 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 master / ed3ee97
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/1/testReport/
Max. process+thread count 286 (vs. ulimit of 30000)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/1/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.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 2m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s 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.
_ master Compile Tests _
+1 💚 mvninstall 3m 32s master passed
+1 💚 compile 0m 57s master passed
+1 💚 checkstyle 0m 21s master passed
+1 💚 spotbugs 0m 45s master passed
+1 💚 spotless 0m 49s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 59s the patch passed
+1 💚 compile 0m 47s the patch passed
-0 ⚠️ javac 0m 47s /results-compile-javac-hbase-client.txt hbase-client generated 1 new + 127 unchanged - 0 fixed = 128 total (was 127)
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 17s the patch passed
+1 💚 spotbugs 0m 49s the patch passed
+1 💚 hadoopcheck 11m 16s Patch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚 spotless 0m 43s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
33m 21s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7397
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux b6ba714a4a5c 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 master / ed3ee97
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 83 (vs. ulimit of 30000)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/1/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.

@droudnitsky droudnitsky changed the title HBASE-29672 Handle comparison failures during filtering gracefully HBASE-29672 Handle runtime comparison failures during filtering gracefully Oct 19, 2025
@droudnitsky
Copy link
Contributor Author

Code snippet to identify all filters which take ByteArrayComparable, majority (5/8) filters are an extension of CompareFilter , but there are 3 outlier ColumnValue filters which do not extend CompareFilter -

    String pkg = "org.apache.hadoop.hbase.filter"; // <-- the package to scan
    List<Class<?>> hits = new ArrayList<>();

    try (ScanResult scan = new ClassGraph()
      .acceptPackages(pkg)
      .enableClassInfo()
      .scan()) {

      for (ClassInfo ci : scan.getAllClasses()) {
        Class<?> cls = ci.loadClass();
        for (Constructor<?> ctor : cls.getDeclaredConstructors()) {
          for (Class<?> pt : ctor.getParameterTypes()) {
            if (pt.getName().equals("org.apache.hadoop.hbase.filter.ByteArrayComparable")   // FQCN safer
              || pt.getSimpleName().equals("ByteArrayComparable")) {  // simple name
              hits.add(cls);
              break;
            }
          }
        }
      }
    }
    System.out.println("matches: " + hits.size());

org.apache.hadoop.hbase.filter.ColumnValueFilter
org.apache.hadoop.hbase.filter.CompareFilter
org.apache.hadoop.hbase.filter.DependentColumnFilter
org.apache.hadoop.hbase.filter.FamilyFilter
org.apache.hadoop.hbase.filter.QualifierFilter
org.apache.hadoop.hbase.filter.RowFilter
org.apache.hadoop.hbase.filter.SingleColumnValueExcludeFilter
org.apache.hadoop.hbase.filter.SingleColumnValueFilter

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 50s 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 _
_ master Compile Tests _
+1 💚 mvninstall 5m 22s master passed
+1 💚 compile 0m 25s master passed
+1 💚 javadoc 0m 24s master passed
+1 💚 shadedjars 7m 3s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 23s the patch passed
+1 💚 compile 0m 25s the patch passed
+1 💚 javac 0m 25s the patch passed
+1 💚 javadoc 0m 20s the patch passed
+1 💚 shadedjars 6m 53s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 2m 31s hbase-client in the patch passed.
30m 37s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7397
Optional Tests javac javadoc unit compile shadedjars
uname Linux 643562f3e776 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / e4a0acd
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/2/testReport/
Max. process+thread count 209 (vs. ulimit of 30000)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/2/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.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 58s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s 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.
_ master Compile Tests _
+1 💚 mvninstall 6m 42s master passed
+1 💚 compile 1m 22s master passed
+1 💚 checkstyle 0m 32s master passed
+1 💚 spotbugs 1m 17s master passed
+1 💚 spotless 1m 22s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 5m 32s the patch passed
+1 💚 compile 1m 19s the patch passed
-0 ⚠️ javac 1m 19s /results-compile-javac-hbase-client.txt hbase-client generated 1 new + 127 unchanged - 0 fixed = 128 total (was 127)
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 29s the patch passed
+1 💚 spotbugs 1m 24s the patch passed
+1 💚 hadoopcheck 13m 55s Patch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚 spotless 0m 57s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 13s The patch does not generate ASF License warnings.
45m 30s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7397
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 21d94226ff17 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / e4a0acd
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 71 (vs. ulimit of 30000)
modules C: hbase-client U: hbase-client
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7397/2/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.

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.

2 participants