-
Notifications
You must be signed in to change notification settings - Fork 160
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
[Feature] Support producer transaction message #154
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
issue #75 |
ifplusor
requested changes
Jun 19, 2019
ifplusor
requested changes
Jun 20, 2019
ifplusor
requested changes
Jul 19, 2019
ifplusor
requested changes
Jul 19, 2019
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.
pass reference to another thread will cause memory problem.
…ocketmq-client-cpp into transaction-development
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Support producer transaction message
Brief changelog
realize the transaction message feature
Verifying this change
executeLocalTransaction enter msg:Message [topic=trans_topic, flag=0, tag=]
executeLocalTransaction transactionId:010011AC0000D95B0000AF8B32130100, return state: 2
sendMessageInTransaction msgId: 010011AC0000D95B0000AF8B32130100
send RT more than: 2808 ms with msgid: 010011AC0000D95B0000AF8B32130100
checkLocalTransaction enter msg:MessageExt [queueId=0, storeSize=279, queueOffset=52809, sysFlag=0, bornTimestamp=1559554079663, bornHost=101.132.96.164, storeTimestamp=1559554081065, storeHost=101.132.96.164, msgId=010011AC0000D95B0000AF8B32130100, commitLogOffset=154611164, bodyCRC=1850051804, reconsumeTimes=0, preparedTransactionOffset=0, Message [topic=trans_topic, flag=0, tag=]]
checkLocalTransaction transactionId:010011AC0000D95B0000AF8B32130100, return state: COMMIT_MESSAGE
2019-06-03 17:58:37 INFO SendMessageThread_1 - Transaction request:EndTransactionRequestHeader{producerGroup='yyy', tranStateTableOffset=52814, commitLogOffset=154612619, commitOrRollback=0, fromTransactionCheck=false, msgId='010011AC0000182600003F924E130100', transactionId=''}
2019-06-03 17:58:37 WARN SendMessageThread_1 - The producer[101.132.96.164:44820] end transaction in sending message, and it's pending status.RequestHeader: EndTransactionRequestHeader{producerGroup='yyy', tranStateTableOffset=52814, commitLogOffset=154612619, commitOrRollback=0, fromTransactionCheck=false, msgId='010011AC0000182600003F924E130100', transactionId=''} Remark:
2019-06-03 17:59:31 INFO TransactionalMessageCheckService - Begin to check prepare message, begin time:1559555971143
2019-06-03 17:59:31 INFO TransactionalMessageCheckService - Check topic=RMQ_SYS_TRANS_HALF_TOPIC, queues=[MessageQueue [topic=RMQ_SYS_TRANS_HALF_TOPIC, brokerName=broker-a, queueId=0]]
2019-06-03 17:59:31 INFO TransactionalMessageCheckService - Before check, the queue=MessageQueue [topic=RMQ_SYS_TRANS_HALF_TOPIC, brokerName=broker-a, queueId=0] msgOffset=52814 opOffset=36
2019-06-03 17:59:31 WARN TransactionalMessageCheckService - Offset illegal. GetMessageStatus=OFFSET_OVERFLOW_ONE, topic=RMQ_SYS_TRANS_OP_HALF_TOPIC, groupId=CID_RMQ_SYS_TRANS, requestOffset=36
2019-06-03 17:59:31 WARN TransactionalMessageCheckService - The miss op offset=36 in queue=MessageQueue [topic=RMQ_SYS_TRANS_OP_HALF_TOPIC, brokerName=broker-a, queueId=0] is illegal, pullResult=PullResult [pullStatus=OFFSET_ILLEGAL, nextBeginOffset=36, minOffset=0, maxOffset=36, msgFoundList=0]
2019-06-03 17:59:31 INFO TransactionalMessageCheckService - Send check message, the offset=52814 restored in queueOffset=52815 commitLogOffset=154612884 newMsgId=658460A400002A9F0000000009373494 realMsgId=010011AC0000182600003F924E130100 topic=RMQ_SYS_TRANS_HALF_TOPIC
2019-06-03 17:59:31 WARN TransactionalMessageCheckService - Offset illegal. GetMessageStatus=OFFSET_OVERFLOW_ONE, topic=RMQ_SYS_TRANS_HALF_TOPIC, groupId=CID_RMQ_SYS_TRANS, requestOffset=52815
2019-06-03 17:59:31 INFO TransactionalMessageCheckService - Illegal offset, the miss offset=52815 in=MessageQueue [topic=RMQ_SYS_TRANS_HALF_TOPIC, brokerName=broker-a, queueId=0], continue check=2, pull result=PullResult [pullStatus=OFFSET_ILLEGAL, nextBeginOffset=52815, minOffset=0, maxOffset=52815, msgFoundList=0]
2019-06-03 17:59:31 WARN TransactionalMessageCheckService - Offset illegal. GetMessageStatus=OFFSET_OVERFLOW_ONE, topic=RMQ_SYS_TRANS_HALF_TOPIC, groupId=CID_RMQ_SYS_TRANS, requestOffset=52815
2019-06-03 17:59:31 INFO TransactionalMessageCheckService - End to check prepare message, consumed time:0
2019-06-03 17:59:31 INFO SendMessageThread_1 - Transaction request:EndTransactionRequestHeader{producerGroup='yyy', tranStateTableOffset=52815, commitLogOffset=154612884, commitOrRollback=8, fromTransactionCheck=false, msgId='010011AC0000182600003F924E130100', transactionId='010011AC0000182600003F924E130100'}
2019-06-03 17:59:31 INFO SendMessageThread_1 - Transaction op message write successfully. messageId=658460A400002A9F0000000009373494, queueId=0 msgExt:MessageExt [queueId=0, storeSize=291, queueOffset=52815, sysFlag=0, bornTimestamp=1559555916351, bornHost=/101.132.96.164:44820, storeTimestamp=1559555971143, storeHost=/101.132.96.164:10911, msgId=658460A400002A9F0000000009373494, commitLogOffset=154612884, bodyCRC=1850051804, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message{topic='RMQ_SYS_TRANS_HALF_TOPIC', flag=0, properties={TRANSACTION_CHECK_TIMES=1, TRAN_MSG=true, UNIQ_KEY=010011AC0000182600003F924E130100, PGROUP=yyy, WAIT=true, TAGS=*}, body=[97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 109, 115, 103, 98, 111, 100, 121, 32, 102, 111, 114, 32, 116, 101, 115, 116], transactionId='null'}]
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.