You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "fausturs (via GitHub)" <gi...@apache.org> on 2025/03/17 08:28:33 UTC

[I] some function not work in protobuf v5 (brpc)

fausturs opened a new issue, #2917:
URL: https://github.com/apache/brpc/issues/2917

   我们注意到在1.12.0以上的版本中,brpc已经切换到protobuf v5了。
   
   在我的测试过程中,我注意到有一个小函数可能在升级时被遗漏了。
   
   https://github.com/apache/brpc/blob/master/src/brpc/parallel_channel.h#L121
   
   在我使用protobuf 28.3时,该函数将编译报错。
   
   原因是,New()函数已经不是虚函数,并且NonreflectableMessage定义了该函数的一个重载(arena版本),这时候google::protobuf::Message::New()的实现被隐藏了。
   
   一些继承自NonreflectableMessage的类型,例如(brpc::RedisRequest)调用该Clone函数时,无法调用真正基类中的New()函数定义。即编译错误


-- 
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: dev-unsubscribe@brpc.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] some function not work in protobuf v5 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2917:
URL: https://github.com/apache/brpc/issues/2917#issuecomment-2728640113

   cc @wasphin 


-- 
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: dev-unsubscribe@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] some function not work in protobuf v5 (brpc)

Posted by "wasphin (via GitHub)" <gi...@apache.org>.
wasphin commented on issue #2917:
URL: https://github.com/apache/brpc/issues/2917#issuecomment-2781498642

   抱歉这一段事情比较多,没太顾上。
   
   验证了下,应该并不是隐藏 New 导致的,使用 28.3 版本编译并没有问题,问题出在运行的时候。Protobuf 26+ 后开始使用 `ClassData` 存储一些元信息,`GetMetadata` 改为基于该信息实现。
   


-- 
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: dev-unsubscribe@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [I] some function not work in protobuf v5 (brpc)

Posted by "wasphin (via GitHub)" <gi...@apache.org>.
wasphin closed issue #2917: some function not work in protobuf v5
URL: https://github.com/apache/brpc/issues/2917


-- 
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: dev-unsubscribe@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org