From 3cc0a93b966e0d3b6ca50edc3442633bf76a3600 Mon Sep 17 00:00:00 2001 From: Nihal Jain Date: Wed, 14 May 2025 13:38:30 +0530 Subject: [PATCH 1/5] HBASE-29303 [hbase-thirdparty] Bump protobuf java to 4.30.2 --- .../src/main/patches/HBASE-15789_V3.patch | 18 +++++++++--------- .../src/main/patches/HBASE-17239.patch | 10 +++++----- pom.xml | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch index 6f9fd05..200a63e 100644 --- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch +++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch @@ -359,10 +359,10 @@ index 000000000..320977290 + } +} diff --git a/src/main/java/com/google/protobuf/ByteString.java b/src/main/java/com/google/protobuf/ByteString.java -index 7b2455f12..f906a4774 100644 +index 558d5a6ab..28795acc2 100644 --- a/src/main/java/com/google/protobuf/ByteString.java +++ b/src/main/java/com/google/protobuf/ByteString.java -@@ -430,6 +430,13 @@ public abstract class ByteString implements Iterable, Serializable { +@@ -429,6 +429,13 @@ public abstract class ByteString implements Iterable, Serializable { return new NioByteString(buffer); } @@ -383,13 +383,13 @@ index 7b2455f12..f906a4774 100644 - - private LeafByteString() {} } - + /** diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java b/src/main/java/com/google/protobuf/CodedInputStream.java -index 81da41778..80fd9153c 100644 +index fbdabf225..cd6f80779 100644 --- a/src/main/java/com/google/protobuf/CodedInputStream.java +++ b/src/main/java/com/google/protobuf/CodedInputStream.java -@@ -178,6 +178,15 @@ public abstract class CodedInputStream { +@@ -191,6 +191,15 @@ public abstract class CodedInputStream { } } @@ -404,8 +404,8 @@ index 81da41778..80fd9153c 100644 + /** Disable construction/inheritance outside of this class. */ private CodedInputStream() {} - -@@ -3970,4 +3979,652 @@ public abstract class CodedInputStream { + +@@ -3943,4 +3952,652 @@ public abstract class CodedInputStream { } } } @@ -1065,7 +1065,7 @@ index d52006754..92ed1f1f7 100644 @@ -196,6 +196,16 @@ final class Utf8 { } } - + + private static int incompleteStateFor(ByteInput bytes, int index, int limit) { + int byte1 = bytes.read(index - 1); + switch (limit - index) { @@ -1082,7 +1082,7 @@ index d52006754..92ed1f1f7 100644 @@ -318,6 +328,24 @@ final class Utf8 { return processor.decodeUtf8(bytes, index, size); } - + + /** + * Determines if the given {@link ByteInput} is a valid UTF-8 string. + * diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch index fc2a172..19bb9eb 100644 --- a/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch +++ b/hbase-shaded-protobuf/src/main/patches/HBASE-17239.patch @@ -1,10 +1,10 @@ diff --git a/src/main/java/com/google/protobuf/CodedInputStream.java b/src/main/java/com/google/protobuf/CodedInputStream.java -index 80fd9153c..11de874dd 100644 +index cd6f80779..3c6d8e878 100644 --- a/src/main/java/com/google/protobuf/CodedInputStream.java +++ b/src/main/java/com/google/protobuf/CodedInputStream.java -@@ -179,11 +179,7 @@ public abstract class CodedInputStream { +@@ -192,11 +192,7 @@ public abstract class CodedInputStream { } - + /** Create a new CodedInputStream wrapping the given {@link ByteInput}. */ - public static CodedInputStream newInstance(ByteInput buf, boolean bufferIsImmutable) { - return new ByteInputDecoder(buf, bufferIsImmutable); @@ -14,7 +14,7 @@ index 80fd9153c..11de874dd 100644 + static CodedInputStream newInstance(ByteInput buf, int off, int len, boolean bufferIsImmutable) { return new ByteInputDecoder(buf, off, len, bufferIsImmutable); } - + diff --git a/src/main/java/com/google/protobuf/UnsafeByteOperations.java b/src/main/java/com/google/protobuf/UnsafeByteOperations.java index 15c1da969..54d2f975a 100644 --- a/src/main/java/com/google/protobuf/UnsafeByteOperations.java @@ -22,7 +22,7 @@ index 15c1da969..54d2f975a 100644 @@ -74,6 +74,17 @@ public final class UnsafeByteOperations { return ByteString.wrap(buffer); } - + + /** + * An unsafe operation that returns a {@link ByteString} that is backed by the provided buffer. + * @param buffer the ByteInput buffer to be wrapped diff --git a/pom.xml b/pom.xml index ccbf515..d6385fb 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,7 @@ 3.3.3 1.7.1 org.apache.hbase.thirdparty - 4.29.2 + 4.30.2 4.1.119.Final 2.0.69.Final 33.4.0-jre From e012f562278a296eadabdefb197494f06e65461e Mon Sep 17 00:00:00 2001 From: Nihal Jain Date: Wed, 14 May 2025 18:31:09 +0530 Subject: [PATCH 2/5] * Make changes (manually) required due to https://github.com/protocolbuffers/protobuf/commit/a4d4bfeae97dae0eb1212e0d3ee9d3c34718916f in HBASE-15789_V3.patch * Also rename HBASE-15789_V3.patch to HBASE-15789_V4.patch --- README.md | 2 +- ...SE-15789_V3.patch => HBASE-15789_V4.patch} | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) rename hbase-shaded-protobuf/src/main/patches/{HBASE-15789_V3.patch => HBASE-15789_V4.patch} (99%) diff --git a/README.md b/README.md index 8352d2e..e070c1f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ rather than to a dir under target because the jar plugin wants src here (its hard to convince it otherwise). We also apply some patches. Current set are: ``` -HBASE-15789_V3.patch +HBASE-15789_V4.patch HBASE-17087.patch HBASE-17239.patch ``` diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch similarity index 99% rename from hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch rename to hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch index 200a63e..c02bbb8 100644 --- a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch +++ b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch @@ -643,25 +643,25 @@ index fbdabf225..cd6f80779 100644 + @Override + public void readGroup(int fieldNumber, MessageLite.Builder builder, + ExtensionRegistryLite extensionRegistry) throws IOException { -+ if (recursionDepth >= recursionLimit) { ++ if (messageDepth + groupDepth >= recursionLimit) { + throw InvalidProtocolBufferException.recursionLimitExceeded(); + } -+ ++recursionDepth; ++ ++groupDepth; + builder.mergeFrom(this, extensionRegistry); + checkLastTagWas(WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_END_GROUP)); -+ --recursionDepth; ++ --groupDepth; + } + + @Override + public T readGroup(int fieldNumber, Parser parser, + ExtensionRegistryLite extensionRegistry) throws IOException { -+ if (recursionDepth >= recursionLimit) { ++ if (messageDepth + groupDepth >= recursionLimit) { + throw InvalidProtocolBufferException.recursionLimitExceeded(); + } -+ ++recursionDepth; ++ ++groupDepth; + T result = parser.parsePartialFrom(this, extensionRegistry); + checkLastTagWas(WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_END_GROUP)); -+ --recursionDepth; ++ --groupDepth; + return result; + } + @@ -675,14 +675,14 @@ index fbdabf225..cd6f80779 100644 + public void readMessage(MessageLite.Builder builder, ExtensionRegistryLite extensionRegistry) + throws IOException { + final int length = readRawVarint32(); -+ if (recursionDepth >= recursionLimit) { ++ if (messageDepth + groupDepth >= recursionLimit) { + throw InvalidProtocolBufferException.recursionLimitExceeded(); + } + final int oldLimit = pushLimit(length); -+ ++recursionDepth; ++ ++messageDepth; + builder.mergeFrom(this, extensionRegistry); + checkLastTagWas(0); -+ --recursionDepth; ++ --messageDepth; + popLimit(oldLimit); + } + @@ -690,14 +690,14 @@ index fbdabf225..cd6f80779 100644 + public T readMessage(Parser parser, + ExtensionRegistryLite extensionRegistry) throws IOException { + int length = readRawVarint32(); -+ if (recursionDepth >= recursionLimit) { ++ if (messageDepth + groupDepth >= recursionLimit) { + throw InvalidProtocolBufferException.recursionLimitExceeded(); + } + final int oldLimit = pushLimit(length); -+ ++recursionDepth; ++ ++messageDepth; + T result = parser.parsePartialFrom(this, extensionRegistry); + checkLastTagWas(0); -+ --recursionDepth; ++ --messageDepth; + popLimit(oldLimit); + return result; + } From f51033838004ee9aeb57adff676c306f18e85300 Mon Sep 17 00:00:00 2001 From: Nihal Jain Date: Thu, 15 May 2025 19:41:56 +0530 Subject: [PATCH 3/5] * Revert back filename to V3 as build fails otherwise --- README.md | 2 +- .../main/patches/{HBASE-15789_V4.patch => HBASE-15789_V3.patch} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hbase-shaded-protobuf/src/main/patches/{HBASE-15789_V4.patch => HBASE-15789_V3.patch} (100%) diff --git a/README.md b/README.md index e070c1f..8352d2e 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ rather than to a dir under target because the jar plugin wants src here (its hard to convince it otherwise). We also apply some patches. Current set are: ``` -HBASE-15789_V4.patch +HBASE-15789_V3.patch HBASE-17087.patch HBASE-17239.patch ``` diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch similarity index 100% rename from hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch rename to hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch From f142475ae358613199655551e1c30927f1788a2e Mon Sep 17 00:00:00 2001 From: Nihal Jain Date: Thu, 15 May 2025 20:05:50 +0530 Subject: [PATCH 4/5] * Gitignore should not ignore patches folder --- .gitignore | 3 ++- README.md | 2 +- .../patches/{HBASE-15789_V3.patch => HBASE-15789_V4.patch} | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename hbase-shaded-protobuf/src/main/patches/{HBASE-15789_V3.patch => HBASE-15789_V4.patch} (100%) diff --git a/.gitignore b/.gitignore index 9af20ec..8f1e942 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ **/target **/dependency-reduced-pom.xml -hbase-shaded-protobuf/src/main/ +hbase-shaded-protobuf/src/main/java +hbase-shaded-protobuf/src/main/resources .project .settings .classpath diff --git a/README.md b/README.md index 8352d2e..e070c1f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ rather than to a dir under target because the jar plugin wants src here (its hard to convince it otherwise). We also apply some patches. Current set are: ``` -HBASE-15789_V3.patch +HBASE-15789_V4.patch HBASE-17087.patch HBASE-17239.patch ``` diff --git a/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch b/hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch similarity index 100% rename from hbase-shaded-protobuf/src/main/patches/HBASE-15789_V3.patch rename to hbase-shaded-protobuf/src/main/patches/HBASE-15789_V4.patch From c3b8f0e54e7d436ba0b1095b004a40c2f331a46f Mon Sep 17 00:00:00 2001 From: Nihal Jain Date: Fri, 16 May 2025 00:57:47 +0530 Subject: [PATCH 5/5] HBASE-29304 [hbase-thirdparty] Bump dependency versions before releasing --- pom.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index d6385fb..80dbc37 100644 --- a/pom.xml +++ b/pom.xml @@ -133,15 +133,15 @@ 1.7.1 org.apache.hbase.thirdparty 4.30.2 - 4.1.119.Final - 2.0.69.Final - 33.4.0-jre + 4.1.121.Final + 2.0.71.Final + 33.4.8-jre 1.9.0 4.4 - 2.36.0 - 2.11.0 - 9.4.56.v20240826 - 12.0.20 + 2.38.0 + 2.13.1 + 9.4.57.v20241219 + 12.0.21 3.1.0 2.46 2.6.1 @@ -149,7 +149,7 @@ 1.3.5 2.0.2 3.30.2-GA - 2.17.3 + 2.19.0 2.30.0