You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2023/06/20 17:07:52 UTC

[GitHub] [bookkeeper] lhotari opened a new pull request, #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

lhotari opened a new pull request, #3997:
URL: https://github.com/apache/bookkeeper/pull/3997

   ### Motivation
   
   - grpc version was upgraded to 1.56.0 in #3992
   - that breaks binary compatibility for DnsNameResolverProvider class
     - see https://github.com/grpc/grpc-java/commit/fcb5c54e4b82d354f42ced0121928fabce9ef53f#diff-b04e884de51ed12ff79482f600a2d4ec18e405ee189a4952ae35f4d2742b7160L50
   
   ### Changes
   
   - make the field type NameResolverProvider instead of DnsNameResolverProvider
     - this prevents possible NoSuchMethodError errors about DnsNameResolverProvider.newNameResolver method 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] zymap merged pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "zymap (via GitHub)" <gi...@apache.org>.
zymap merged PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] lhotari commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1602565072

   @zymap I made an attempt in #4000 to fix the issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] lhotari commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1602548443

   @zymap Perhaps setting `protoc3.version` and `protoc-gen-grpc-java.version` to some older version would help?
   https://github.com/grpc/grpc-java/issues/10202#issuecomment-1553739615
   
   It seems to be designed that way that code gen should be generated with the oldest version of the supported library.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] lhotari commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1600773929

   In Pulsar we need Bookkeeper 4.16.2 release with this fix until we can make the [switch to grpc-java 1.56 on Pulsar side](https://github.com/apache/pulsar/pull/20602). @zymap @hangc0276 @eolivelli @nicoloboschi @dlg99  Any timeline for 4.16.2 release?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] lhotari commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1600768264

   This PR will also be useful to cherry-pick on maintenance branches to support grpc-java >= 1.54.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] zymap commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "zymap (via GitHub)" <gi...@apache.org>.
zymap commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1602136810

   @lhotari  I am preparing the release, and I think we can release it in the next week. But I met [some failures in Pulsar's CI ](https://github.com/zymap/pulsar/pull/46)and need to take a look before sending the vote. It looks like something is wrong with the bookie that causes the pulsar's tests to fail.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] lhotari commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1602541608

   > It seems I met the same issue mentioned here [protocolbuffers/protobuf#11986](https://github.com/protocolbuffers/protobuf/issues/11986)
   > 
   > Pulsar errors:
   > 
   > Caused by: java.lang.IllegalAccessError: class org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint tried to access method 'com.google.protobuf.LazyStringArrayList com.google.protobuf.LazyStringArrayList.emptyList()' (org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint and com.google.protobuf.LazyStringArrayList are in unnamed module of loader 'app')
   
   @zymap I wonder what the resolution is? Perhaps there's an option to downgrade protobuf to 3.21.x ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] zymap commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "zymap (via GitHub)" <gi...@apache.org>.
zymap commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1605911642

   > > It seems I met the same issue mentioned here [protocolbuffers/protobuf#11986](https://github.com/protocolbuffers/protobuf/issues/11986)
   > > Pulsar errors:
   > > Caused by: java.lang.IllegalAccessError: class org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint tried to access method 'com.google.protobuf.LazyStringArrayList com.google.protobuf.LazyStringArrayList.emptyList()' (org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint and com.google.protobuf.LazyStringArrayList are in unnamed module of loader 'app')
   > 
   > @zymap I wonder what the resolution is? Perhaps there's an option to downgrade protobuf to 3.21.x ?
   
   @lhotari I found the reason for this error. It is caused by the protobuf-java version. In the generated code, it uses `emptyList()`
   ```
   auth_ =
               com.google.protobuf.LazyStringArrayList.emptyList();
           extensions_ =
               com.google.protobuf.LazyStringArrayList.emptyList();
   ```
   
   In the pulsar side, we are using 3.19.6, which the `emptyList()` method is package private https://github.com/protocolbuffers/protobuf/blob/5cba162a5d93f8df786d828621019e03e50edb4f/java/core/src/main/java/com/google/protobuf/LazyStringArrayList.java#L70
   
   They have exposed the method to the public since 3.22.0 https://github.com/protocolbuffers/protobuf/commit/c658e27529ccf4a000724ab3622f1b807c85449b
   
   This means if we want to change upgrade protobuf to 3.22.0+, we must require all the sub-project, which depends on the bookkeeper to upgrade protobuf to 3.22.0+. It should not be acceptable in a minor release. 
   So I will exclude this PR from the 4.16.2 release and include it in the next major release.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] zymap commented on pull request #3997: Fix issue with binary compatibility with older grpc versions at runtime in the client

Posted by "zymap (via GitHub)" <gi...@apache.org>.
zymap commented on PR #3997:
URL: https://github.com/apache/bookkeeper/pull/3997#issuecomment-1602303732

   It seems I met the same issue mentioned here https://github.com/protocolbuffers/protobuf/issues/11986
   
   Pulsar errors:
   
   ```
   Caused by: java.lang.IllegalAccessError: class org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint tried to access method 'com.google.protobuf.LazyStringArrayList com.google.protobuf.LazyStringArrayList.emptyList()' (org.apache.bookkeeper.proto.DataFormats$BookieServiceInfoFormat$Endpoint and com.google.protobuf.LazyStringArrayList are in unnamed module of loader 'app')
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org