Skip to content
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

support to delete undolog in back task #1235

Merged
merged 28 commits into from
Jul 31, 2019

Conversation

github-ygy
Copy link
Contributor

Ⅰ. Describe what this PR did

support to delete undolog in back task

Ⅱ. Does this pull request fix one issue?

a feature,some case the undolog will not delete ,the pr can avoid the undo_log table so big

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jun 24, 2019

Codecov Report

Merging #1235 into develop will decrease coverage by 0.28%.
The diff coverage is 24.44%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1235      +/-   ##
=============================================
- Coverage       48.6%   48.32%   -0.29%     
- Complexity      1645     1653       +8     
=============================================
  Files            331      333       +2     
  Lines          11535    11669     +134     
  Branches        1430     1448      +18     
=============================================
+ Hits            5607     5639      +32     
- Misses          5306     5401      +95     
- Partials         622      629       +7
Impacted Files Coverage Δ Complexity Δ
...ava/io/seata/core/constants/ConfigurationKeys.java 0% <ø> (ø) 0 <0> (ø) ⬇️
.../main/java/io/seata/core/protocol/MessageType.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...core/protocol/transaction/BranchCommitRequest.java 33.33% <ø> (ø) 1 <0> (ø) ⬇️
...rc/main/java/io/seata/core/rpc/ChannelManager.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...c/main/java/io/seata/core/rpc/netty/RpcServer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ore/protocol/transaction/UndoLogDeleteRequest.java 0% <0%> (ø) 0 <0> (?)
...ava/io/seata/core/rpc/netty/RmMessageListener.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...cc/src/main/java/io/seata/rm/tcc/RMHandlerTCC.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...asource/src/main/java/io/seata/rm/RMHandlerAT.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...java/io/seata/codec/seata/MessageCodecFactory.java 88.27% <100%> (+1.65%) 70 <0> (+3) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3665aec...2da6e2b. Read the comment docs.

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Override
public AbstractTransactionResponse handle(RpcContext rpcContext) {
handler.handle(this);
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why return null ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why return null ?

async,we don't need reply

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: UndoLogDeleteRequest needs to support PB later

byteBuffer.putShort((short)0);
}
//3.save days
byteBuffer.putInt(saveDays);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably short enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
Map<String,Channel> channels = new HashMap(RM_CHANNELS.size());
for (String resourceId : RM_CHANNELS.keySet()) {
Channel channel = tryOtherApp(RM_CHANNELS.get(resourceId), null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why tryOtherApp? tryOtherApp just get from RM_CHANNELS, loop is also getting from RM_CHANNELS and your map can only save one channel for a resource

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method i have modified,when the param applitioncation is null,will find one avtive channel from all application.

/**
* The Timeout retry delay.
*/
protected int transactionUndologDeleteDelay = CONFIG.getInt(ConfigurationKeys.TRANSACTION_UNDO_LOG_DELETE_DELAY, 24 * 60);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best to indicate the time unit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with committingRetryDelay,asynCommittingRetryDelay,timeoutRetryDelay, default is SECONDS

github-ygy and others added 9 commits July 5, 2019 14:13
…_del_backup

# Conflicts:
#	core/src/main/java/io/seata/core/constants/ConfigurationKeys.java
#	core/src/main/java/io/seata/core/protocol/AbstractMessage.java
…_del_backup

# Conflicts:
#	core/src/main/java/io/seata/core/rpc/ServerMessageSender.java
#	core/src/main/java/io/seata/core/rpc/netty/RmMessageListener.java
#	core/src/main/java/io/seata/core/rpc/netty/RpcServer.java
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the configuration item to the configuration file.

@github-ygy
Copy link
Contributor Author

Please add the configuration item to the configuration file.

done

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@slievrly slievrly merged commit 21add28 into apache:develop Jul 31, 2019
@wangliang181230 wangliang181230 added this to the 0.8.1 milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants