Skip to content

HBASE-28390 WAL value compression fails for cells with large values - #5696

Merged
bbeaudreault merged 1 commit into
apache:masterfrom
HubSpot:HBASE-28390
Feb 23, 2024
Merged

HBASE-28390 WAL value compression fails for cells with large values#5696
bbeaudreault merged 1 commit into
apache:masterfrom
HubSpot:HBASE-28390

Conversation

@bbeaudreault

@bbeaudreaultbbeaudreault commented Feb 22, 2024

Copy link
Copy Markdown
Contributor

Unify all of the WAL compression tests to utilize tests defined in the base class. Add a testLarge test which writes large buffers. Prior to the fixes in CompressionContext and WALDecompressionBoundedDelegatingInputStream, these tests all failed.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 15sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall4m 6smaster passed
+1 💚compile4m 37smaster passed
+1 💚checkstyle1m 27smaster passed
+1 💚spotless0m 48sbranch has no errors when running spotless:check.
+1 💚spotbugs3m 34smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall2m 48sthe patch passed
+1 💚compile4m 12sthe patch passed
+1 💚javac4m 12sthe patch passed
-0 ⚠️checkstyle0m 35shbase-server: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck4m 54sPatch does not cause any errors with Hadoop 3.3.6.
+1 💚spotless0m 42spatch has no errors when running spotless:check.
+1 💚spotbugs4m 26sthe patch passed
_ Other Tests _
+1 💚asflicense1m 7sThe patch does not generate ASF License warnings.
42m 30s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5696
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux c4438ae23f31 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 7be588e
Default JavaEclipse Adoptium-11.0.17+8
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count79 (vs. ulimit of 30000)
modulesC: hbase-server hbase-compression/hbase-compression-aircompressor hbase-compression/hbase-compression-brotli hbase-compression/hbase-compression-lz4 hbase-compression/hbase-compression-snappy hbase-compression/hbase-compression-xz hbase-compression/hbase-compression-zstd U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 38sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for branch
+1 💚mvninstall3m 5smaster passed
+1 💚compile2m 22smaster passed
+1 💚shadedjars5m 14sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 44smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for patch
+1 💚mvninstall2m 45sthe patch passed
+1 💚compile2m 21sthe patch passed
+1 💚javac2m 21sthe patch passed
+1 💚shadedjars5m 11spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 43sthe patch passed
_ Other Tests _
+1 💚unit230m 8shbase-server in the patch passed.
+1 💚unit1m 16shbase-compression-aircompressor in the patch passed.
+1 💚unit0m 57shbase-compression-brotli in the patch passed.
+1 💚unit0m 47shbase-compression-lz4 in the patch passed.
+1 💚unit0m 48shbase-compression-snappy in the patch passed.
+1 💚unit2m 53shbase-compression-xz in the patch passed.
+1 💚unit6m 15shbase-compression-zstd in the patch passed.
274m 1s
SubsystemReport/Notes
DockerClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5696
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 2d5cc2c686a7 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 7be588e
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/testReport/
Max. process+thread count5630 (vs. ulimit of 30000)
modulesC: hbase-server hbase-compression/hbase-compression-aircompressor hbase-compression/hbase-compression-brotli hbase-compression/hbase-compression-lz4 hbase-compression/hbase-compression-snappy hbase-compression/hbase-compression-xz hbase-compression/hbase-compression-zstd U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 27sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for branch
+1 💚mvninstall2m 52smaster passed
+1 💚compile1m 56smaster passed
+1 💚shadedjars5m 45sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 24smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall2m 31sthe patch passed
+1 💚compile1m 56sthe patch passed
+1 💚javac1m 56sthe patch passed
+1 💚shadedjars5m 41spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc1m 22sthe patch passed
_ Other Tests _
+1 💚unit232m 39shbase-server in the patch passed.
+1 💚unit1m 9shbase-compression-aircompressor in the patch passed.
+1 💚unit0m 51shbase-compression-brotli in the patch passed.
+1 💚unit0m 41shbase-compression-lz4 in the patch passed.
+1 💚unit0m 42shbase-compression-snappy in the patch passed.
+1 💚unit3m 19shbase-compression-xz in the patch passed.
+1 💚unit5m 22shbase-compression-zstd in the patch passed.
273m 48s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5696
Optional Testsjavac javadoc unit shadedjars compile
unameLinux f180f4d304a8 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 7be588e
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/testReport/
Max. process+thread count5104 (vs. ulimit of 30000)
modulesC: hbase-server hbase-compression/hbase-compression-aircompressor hbase-compression/hbase-compression-brotli hbase-compression/hbase-compression-lz4 hbase-compression/hbase-compression-snappy hbase-compression/hbase-compression-xz hbase-compression/hbase-compression-zstd U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5696/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

}
}

private int rawReadInt(InputStream in) throws IOException {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm surprised commons-io or our own util code doesn't have something like this already.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I tried looking and couldn't find one. I'll try looking again

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Woops I think IOUtils.readInt should work. Any other comments/concerns other than that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left an approving review with the rest. Thanks!

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Actually, there is no IOUtils.readInt in commons-io. I realized that the IOUtils I was referring to (while on mobile) was a different library that we don't have a dependency on.

We have a variety of methods for reading ints from byte[] or ByteBuffer, but not for InputStream that I can find. I could read the bytes into a byte[4] and use one of the utils, but I'd rather not allocate an unnecessary byte array. I'm going to leave this alone for now.

}

public void doTest(TableName tableName) throws Exception {
@Test

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for cleaning this up and removing all the unneeded boilerplate.

// if the uncompressed size was larger than the configured buffer size for the codec,
// the BlockCompressorStream will have left an extra 4 bytes hanging. This represents a size
// for the next segment, and it should be 0. See HBASE-28390
if (lowerIn.available() == 4) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This part is ugly but I don't have an alternative suggestion. At least we know both in the WAL read and HFile read cases we won't be contending with a short read, so available is going to be either 0 or 4 and otherwise we'd have had an EOFException thrown.

@bbeaudreault
bbeaudreault merged commit 0ea11f2 into apache:masterFeb 23, 2024
@bbeaudreault
bbeaudreault deleted the HBASE-28390 branch February 23, 2024 17:30
bbeaudreault added a commit that referenced this pull request Feb 23, 2024
bbeaudreault added a commit that referenced this pull request Feb 23, 2024
bbeaudreault added a commit that referenced this pull request Feb 23, 2024
bbeaudreault added a commit that referenced this pull request Feb 23, 2024
bbeaudreault added a commit to HubSpot/hbase that referenced this pull request Mar 4, 2024
…ith large values (apache#5696)
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Sign up for freeto 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.

3 participants

@bbeaudreault@Apache-HBase@apurtell