You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/11/28 12:38:32 UTC

[GitHub] [rocketmq-client-cpp] shuyanzhu opened a new issue #337: bug, should rethrow error

shuyanzhu opened a new issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337


   https://github.com/apache/rocketmq-client-cpp/blob/a42de735a3319a859f6108c9e714ed715fe45969/src/consumer/DefaultMQPullConsumerImpl.cpp#L290


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu edited a comment on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu edited a comment on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735337288


   I mean all PulCalllbacks which were allocated in heap need to "delete this" in onSuccess or onException because there is no AutoDeletePullCallback to be inherited by user. SendCallback does has AutoDeleteSendCallback, but if there is exception occurs in send AutoDeleteSendCallback don't work, so user should catch exceptions and delete SendCallback mannually. I am confused why PullCallback doesn't has AutoDelete like SendCallback:
   
   > https://github.com/apache/rocketmq-client-cpp/blob/87350727950d1ece9ed3ffab414bbe0f673eeaac/include/AsyncCallback.h#L39
   


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu edited a comment on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu edited a comment on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735337288


   I mean all Pullbacks which were allocated in heap need to "delete this" in onSuccess or onException because there is no AutoDeletePullback to be inherited by user. Sendback does has AutoDeleteSendback, but if there is exception occurs in send AutoDeleteSendback don't work, so user should catch exceptions and delete Sendback mannually. I am confused why Pullback doesn't has AutoDelete like Sendback like 
   
   > https://github.com/apache/rocketmq-client-cpp/blob/87350727950d1ece9ed3ffab414bbe0f673eeaac/include/AsyncCallback.h#L39
   


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-768115322


   Should I close this 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.

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



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735301226


   It looks like the code has some 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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-736679907


   Maybe I make a pr when I'm free?


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-768114190


   Looks like there is no pull API anymore, nice(Doge)


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735322063


   User should catch this exception and may call the Pullback::onException(MQException &), and then delete call back if it was allocated in heap when Pullback::onException(MQException &) don't "delete this", just like the code in send message( another issue in send user should konw is the AutoDeleteSendback don't work normally in this case because it is called by SendCallbackWrap::onException ). It's my opinion.
   
   > https://github.com/apache/rocketmq-client-cpp/blob/a42de735a3319a859f6108c9e714ed715fe45969/src/producer/DefaultMQProducerImpl.cpp#L231


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-736887066


   @shuyanzhu Welcome to PR.


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-768118319


   > Should I close this issue?
   
   Improving the master branch is also beneficial, welcome to PR.


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735337288


   I mean all Pullbacks which were allocated in heap need to "delete this" in onSuccess or onException because there is no AutoDeletePullback to be inherited by user. Sendback does has AutoDeleteSendback, but if there is exception occurs in send AutoDeleteSendback don't work, so user should catch exceptions and delte Sendback mannually. I am confused why Pullback doesn't has AutoDelete like Sendback like 
   
   > https://github.com/apache/rocketmq-client-cpp/blob/87350727950d1ece9ed3ffab414bbe0f673eeaac/include/AsyncCallback.h#L39
   


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu edited a comment on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu edited a comment on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735322063


   User should catch this exception and may call the PullCallback::onException(MQException &), and then delete call back if it was allocated in heap when PullCallback::onException(MQException &) don't "delete this", just like the code in send message( another issue in send user should konw is the AutoDeleteSendCallback don't work normally in this case because it is called by SendCallbackWrap::onException ). It's my opinion.
   
   > https://github.com/apache/rocketmq-client-cpp/blob/a42de735a3319a859f6108c9e714ed715fe45969/src/producer/DefaultMQProducerImpl.cpp#L231


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-768108578


   @shuyanzhu  I check this issue again, and I think the version of re_dev branch meets your expectations.


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-768116943


   > Looks like there is no pull API anymore, nice(Doge)
   
   A new LitePullConsumer is wip.


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] ifplusor edited a comment on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
ifplusor edited a comment on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735301226


   It looks like the code has some issue, and I think call callback function is better.


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu edited a comment on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu edited a comment on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735337288


   I mean all Pullbacks which were allocated in heap need to "delete this" in onSuccess or onException because there is no AutoDeletePullback to be inherited by user. Sendback does has AutoDeleteSendback, but if there is exception occurs in send AutoDeleteSendback don't work, so user should catch exceptions and delete Sendback mannually. I am confused why Pullback doesn't has AutoDelete like Sendback:
   
   > https://github.com/apache/rocketmq-client-cpp/blob/87350727950d1ece9ed3ffab414bbe0f673eeaac/include/AsyncCallback.h#L39
   


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] vongosling commented on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
vongosling commented on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735510318


   @ShannonDing ping


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-client-cpp] shuyanzhu edited a comment on issue #337: bug, should rethrow error

Posted by GitBox <gi...@apache.org>.
shuyanzhu edited a comment on issue #337:
URL: https://github.com/apache/rocketmq-client-cpp/issues/337#issuecomment-735322063


   User should catch this exception and may call the PullCallback::onException(MQException &), and then delete call back if it was allocated in heap when PullCallback::onException(MQException &) don't "delete this", just like the code in send message( another issue in send user should konw is the AutoDeleteSendCallback don't work normally in this case because it is called by SendCallbackWrap::onException ). It's my opinion.
   
   > https://github.com/apache/rocketmq-client-cpp/blob/a42de735a3319a859f6108c9e714ed715fe45969/src/producer/DefaultMQProducerImpl.cpp#L248


----------------------------------------------------------------
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.

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