-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Fix Java concurrency issue in feature resolution for old <=3.25.x gen… #20750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…code using lazy feature resolution. This should not impact current gencode from >=4.x.x which resolves features in static init. Fixes #20599 PiperOrigin-RevId: 738467326
startSignal, | ||
doneSignal, | ||
// Static method invocation triggers static initialization. | ||
() -> Assert.assertNotNull(UnittestProto.getDescriptor()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this UnittestProto
generated by protoc 25.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- //java/core:v25ConcurrentDescriptorsTest
uses UnittestProto
from v25 gencode jars.
protobuf/java/core/BUILD.bazel
Lines 667 to 699 in 0e9d0f6
junit_tests( | |
name = "v25_core_tests_jar", | |
size = "small", | |
srcs = glob( | |
["src/test/java/**/*.java"], | |
exclude = [ | |
# Depends on test protos or API changes added in v4.x.x (e.g. editions) | |
"src/test/java/com/google/protobuf/TextFormatTest.java", | |
"src/test/java/com/google/protobuf/DescriptorsTest.java", | |
"src/test/java/com/google/protobuf/DebugFormatTest.java", | |
"src/test/java/com/google/protobuf/CodedOutputStreamTest.java", | |
"src/test/java/com/google/protobuf/CodedInputStreamTest.java", | |
"src/test/java/com/google/protobuf/ProtobufToStringOutputTest.java", | |
"src/test/java/com/google/protobuf/FieldPresenceTest.java", | |
# Excluded in core_tests | |
"src/test/java/com/google/protobuf/DecodeUtf8Test.java", | |
"src/test/java/com/google/protobuf/IsValidUtf8Test.java", | |
"src/test/java/com/google/protobuf/TestUtil.java", | |
"src/test/java/com/google/protobuf/TestUtilLite.java", | |
"src/test/java/com/google/protobuf/RuntimeVersionTest.java", | |
], | |
), | |
test_prefix = "v25Jar", | |
deps = [ | |
":core", | |
":v25_test_util_jar", | |
"//compatibility:v25_test_protos_jar", | |
"@protobuf_maven_dev//:com_google_guava_guava", | |
"@protobuf_maven_dev//:com_google_truth_truth", | |
"@protobuf_maven_dev//:junit_junit", | |
"@protobuf_maven_dev//:org_mockito_mockito_core", | |
], | |
) |
…code using lazy feature resolution.
This should not impact current gencode from >=4.x.x which resolves features in static init.
Fixes #20599
PiperOrigin-RevId: 738467326
Cherry-pick of fafb0fd