-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
bugfix: fix access key loss after server restart #5097
bugfix: fix access key loss after server restart #5097
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #5097 +/- ##
=============================================
+ Coverage 49.31% 49.34% +0.03%
- Complexity 4135 4145 +10
=============================================
Files 737 737
Lines 26187 26187
Branches 3233 3233
=============================================
+ Hits 12913 12923 +10
+ Misses 11890 11881 -9
+ Partials 1384 1383 -1
|
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.
LGTM
core/src/main/java/io/seata/core/rpc/netty/TmNettyRemotingClient.java
Outdated
Show resolved
Hide resolved
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.
LGTM @slievrly PTAL
super(nettyClientConfig, eventExecutorGroup, messageExecutor, NettyPoolKey.TransactionRole.TMROLE); | ||
this.signer = EnhancedServiceLoader.load(AuthSigner.class); | ||
this.applicationId = applicationId; | ||
this.transactionServiceGroup = transactionServiceGroup; | ||
this.accessKey = accessKey; |
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.
It is recommended to check whether the value is null. Setting the value to null is meaningless. Use the setXXX call directly
这里建议判断是否为null,设置为null是无意义的。直接使用setXXX调用。
* @return the instance | ||
*/ | ||
public static TmNettyRemotingClient getInstance(String applicationId, String transactionServiceGroup) { | ||
return getInstance(applicationId, transactionServiceGroup, null, null); |
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.
It is recommended to retain the method without the ak/sk parameter.
建议保留无ak/sk 参数的方法。
this.accessKey = accessKey; | ||
return; | ||
} | ||
this.accessKey = System.getProperty(SEATA_ACCESS_KEY); |
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.
It is recommended to keep this part, but also to determine if it is null.
建议保留,但同样需要判空。
…thub.com/renliangyu857/seata into bugfix_accesskey_loss_afterserverrestart
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.
LGTM
…o 1114_for_5073 * '1114_for_5073' of https://github.com/zw201913/seata: bugfix: hikari datasource auto proxy fail (apache#5134) bugfix: rollback active xa connection fail (apache#5131) optimize: support oracle on delete tccfence logs (apache#5124) feature: support passing `contextPath` parameter to Nacos client (apache#5111) bugfix:NPE caused when there is no @GlobalTransactional annotation on the RM side (apache#5109) bugfix: Druid disable oracle implicit cache (apache#5098) bugfix: fix access key loss after server restart (apache#5097) optimize: remove druid dependency in ConnectionProxy (apache#5104) bugfix:fix ClassNotFoundException during the ZK unit test (apache#5101) bugfix: fix when seata and jpa are used together, their AutoConfiguration order is incorrect (apache#5092) optimize: lock priority attempts to insert (apache#4681) bugfix: update join condition placeholder param error (apache#5052)
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fixes #5080
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews