Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
211010717
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
211010717
Commits
ee18dad4
Unverified
Commit
ee18dad4
authored
4 years ago
by
liujian
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
optimize: globalTransactionScanner listener optimize (#3380)
parent
96016f0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changes/1.5.0.md
+2
-0
2 additions, 0 deletions
changes/1.5.0.md
changes/en-us/1.5.0.md
+2
-0
2 additions, 0 deletions
changes/en-us/1.5.0.md
spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java
+4
-4
4 additions, 4 deletions
.../io/seata/spring/annotation/GlobalTransactionScanner.java
with
8 additions
and
4 deletions
changes/1.5.0.md
+
2
−
0
View file @
ee18dad4
...
...
@@ -43,6 +43,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
-
[
[#3359
](
https://github.com/seata/seata/pull/3359
)
] 删除未使用的测试用例
-
[
[#3397
](
https://github.com/seata/seata/pull/3397
)
] 添加更改记录文件夹
-
[
[#3303
](
https://github.com/seata/seata/pull/3303
)
] 支持从nacos单一dataId中读取所有配置
-
[
[#3380
](
https://github.com/seata/seata/pull/3380
)
] 优化globalTransactionScanner监听器
...
...
@@ -63,6 +64,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
-
[
anselleeyy
](
https://github.com/anselleeyy
)
-
[
Ifdevil
](
https://github.com/Ifdevil
)
-
[
Rubbernecker
](
https://github.com/Rubbernecker
)
-
[
lj2018110133
](
https://github.com/lj2018110133
)
同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
...
...
This diff is collapsed.
Click to expand it.
changes/en-us/1.5.0.md
+
2
−
0
View file @
ee18dad4
...
...
@@ -42,6 +42,7 @@
-
[
[#3359
](
https://github.com/seata/seata/pull/3359
)
] remove unused test case
-
[
[#3397
](
https://github.com/seata/seata/pull/3397
)
] add the change records folder
-
[
[#3303
](
https://github.com/seata/seata/pull/3303
)
] supports reading all configurations from a single Nacos dataId
-
[
[#3380
](
https://github.com/seata/seata/pull/3380
)
] globalTransactionScanner listener optimize
### test
...
...
@@ -59,6 +60,7 @@
-
[
anselleeyy
](
https://github.com/anselleeyy
)
-
[
Ifdevil
](
https://github.com/Ifdevil
)
-
[
Rubbernecker
](
https://github.com/Rubbernecker
)
-
[
lj2018110133
](
https://github.com/lj2018110133
)
Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
...
...
This diff is collapsed.
Click to expand it.
spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java
+
4
−
4
View file @
ee18dad4
...
...
@@ -329,12 +329,12 @@ public class GlobalTransactionScanner extends AbstractAutoProxyCreator
@Override
public
void
afterPropertiesSet
()
{
ConfigurationCache
.
addConfigListener
(
ConfigurationKeys
.
DISABLE_GLOBAL_TRANSACTION
,
(
ConfigurationChangeListener
)
this
);
if
(
disableGlobalTransaction
)
{
if
(
LOGGER
.
isInfoEnabled
())
{
LOGGER
.
info
(
"Global transaction is disabled."
);
}
ConfigurationCache
.
addConfigListener
(
ConfigurationKeys
.
DISABLE_GLOBAL_TRANSACTION
,
(
ConfigurationChangeListener
)
this
);
return
;
}
if
(
initialized
.
compareAndSet
(
false
,
true
))
{
...
...
@@ -351,10 +351,10 @@ public class GlobalTransactionScanner extends AbstractAutoProxyCreator
@Override
public
void
onChangeEvent
(
ConfigurationChangeEvent
event
)
{
if
(
ConfigurationKeys
.
DISABLE_GLOBAL_TRANSACTION
.
equals
(
event
.
getDataId
()))
{
LOGGER
.
info
(
"{} config changed, old value:{}, new value:{}"
,
ConfigurationKeys
.
DISABLE_GLOBAL_TRANSACTION
,
disableGlobalTransaction
,
event
.
getNewValue
());
disableGlobalTransaction
=
Boolean
.
parseBoolean
(
event
.
getNewValue
().
trim
());
if
(!
disableGlobalTransaction
&&
initialized
.
compareAndSet
(
false
,
true
))
{
LOGGER
.
info
(
"{} config changed, old value:{}, new value:{}"
,
ConfigurationKeys
.
DISABLE_GLOBAL_TRANSACTION
,
disableGlobalTransaction
,
event
.
getNewValue
());
initClient
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment