-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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 the application was configured to degrade at startup and can't be dynamically switch to upgraded #2929
Conversation
…can't be dynamically switch to upgraded Signed-off-by: slievrly <slievrly@163.com>
Codecov Report
@@ Coverage Diff @@
## develop #2929 +/- ##
=============================================
+ Coverage 56.18% 56.24% +0.05%
- Complexity 559 561 +2
=============================================
Files 57 57
Lines 3458 3458
Branches 423 423
=============================================
+ Hits 1943 1945 +2
Misses 1262 1262
+ Partials 253 251 -2
|
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(TccActionInterceptor.class); | ||
|
||
private ActionInterceptorHandler actionInterceptorHandler = new ActionInterceptorHandler(); | ||
|
||
private boolean disable = ConfigurationFactory.getInstance().getBoolean(ConfigurationKeys.DISABLE_GLOBAL_TRANSACTION, |
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.
DISABLE_GLOBAL_TRANSACTION 已经被订阅了,此类并未有其他需要监听处理的业务,为何不直接创建位局部变量,进行getBoolean?
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.
for the upgrade and downgrade functions,needs to be explicitly printed in the log.
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.
volatile
@@ -78,8 +80,9 @@ | |||
private final String applicationId; | |||
private final String txServiceGroup; | |||
private final int mode; | |||
private final boolean disableGlobalTransaction = ConfigurationFactory.getInstance().getBoolean( | |||
private boolean disableGlobalTransaction = ConfigurationFactory.getInstance().getBoolean( |
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.
volatile ?
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.
done
resolve code conflicts |
Signed-off-by: slievrly <slievrly@163.com>
Signed-off-by: slievrly <slievrly@163.com>
Signed-off-by: slievrly <slievrly@163.com>
Signed-off-by: slievrly <slievrly@163.com> # Conflicts: # spring/src/main/java/io/seata/spring/tcc/TccActionInterceptor.java
Signed-off-by: slievrly <slievrly@163.com> # Conflicts: # spring/src/main/java/io/seata/spring/tcc/TccActionInterceptor.java
Codecov Report
@@ Coverage Diff @@
## develop #2929 +/- ##
=============================================
- Coverage 50.41% 50.41% -0.01%
- Complexity 3124 3126 +2
=============================================
Files 594 594
Lines 19685 19700 +15
Branches 2457 2460 +3
=============================================
+ Hits 9925 9932 +7
- Misses 8755 8765 +10
+ Partials 1005 1003 -2
|
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
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
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
…can't be dynamically switch to upgraded (apache#2929)
…can't be dynamically switch to upgraded (apache#2929)
Signed-off-by: slievrly slievrly@163.com
Ⅰ. Describe what this PR did
bugfix: fix the application was configured to degrade at startup and can't be dynamically switch to upgraded
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
before startup: service.disableGlobalTransaction=true;
after startup: service.disableGlobalTransaction=true;
Note that you need to use a configuration center that is not of file type. Dynamic configuration does not take effect when using seata-spring-boot-starter && type=file.
Ⅴ. Special notes for reviews