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

bugfix:fix the value of disableGlobalTransaction not being read correctly #2219

Merged
merged 8 commits into from
Feb 3, 2020
Merged

bugfix:fix the value of disableGlobalTransaction not being read correctly #2219

merged 8 commits into from
Feb 3, 2020

Conversation

xingfudeshi
Copy link
Member

Ⅰ. Describe what this PR did

fix the value of disableGlobalTransaction not being read correctly.

Ⅱ. Does this pull request fix one issue?

fixes #2114

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

I've done integration testing.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@xingfudeshi xingfudeshi added this to the 1.1.0 milestone Jan 22, 2020
@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

Merging #2219 into develop will decrease coverage by <.01%.
The diff coverage is 60%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2219      +/-   ##
=============================================
- Coverage      53.15%   53.15%   -0.01%     
- Complexity      2515     2516       +1     
=============================================
  Files            485      485              
  Lines          15360    15362       +2     
  Branches        1771     1772       +1     
=============================================
+ Hits            8165     8166       +1     
- Misses          6409     6411       +2     
+ Partials         786      785       -1
Impacted Files Coverage Δ Complexity Δ
...gure/provider/SpringBootConfigurationProvider.java 32.3% <0%> (-1.03%) 9 <0> (ø)
...c/main/java/io/seata/config/FileConfiguration.java 36.79% <100%> (ø) 6 <0> (ø) ⬇️
...server/store/file/FileTransactionStoreManager.java 56.5% <0%> (-0.64%) 29% <0%> (-1%)
...o/seata/server/coordinator/DefaultCoordinator.java 50.19% <0%> (+0.38%) 31% <0%> (ø) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 84.61% <0%> (+0.48%) 68% <0%> (+1%) ⬆️
...ain/java/io/seata/config/ConfigurationFactory.java 53.06% <0%> (+2.04%) 4% <0%> (+1%) ⬆️

@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

Merging #2219 into develop will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2219      +/-   ##
=============================================
- Coverage      53.05%   53.03%   -0.02%     
+ Complexity      2501     2499       -2     
=============================================
  Files            485      485              
  Lines          15304    15304              
  Branches        1755     1755              
=============================================
- Hits            8119     8117       -2     
  Misses          6409     6409              
- Partials         776      778       +2
Impacted Files Coverage Δ Complexity Δ
...main/java/io/seata/core/store/db/LogStoreSqls.java 18.86% <ø> (ø) 10 <0> (ø) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 84.13% <0%> (-0.49%) 67% <0%> (-1%)
...o/seata/server/coordinator/DefaultCoordinator.java 49.8% <0%> (-0.39%) 30% <0%> (-1%)

Copy link
Contributor

@zjinlei zjinlei left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -67,9 +67,12 @@ public Object intercept(Object proxy, Method method, Object[] args, MethodProxy
result = get(convertDataId(rawDataId), args[1], (Long) args[2]);
}
if (null != result) {
//If the return type is String,need to convert the object to string
if (method.getReturnType().equals(String.class)) {
Copy link
Member

Choose a reason for hiding this comment

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

What about the rest? Such as getBoolean 、 getShort、getInt、getLong?

Copy link
Member Author

Choose a reason for hiding this comment

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

GetConfig converts the values of all configuration items to strings and returns them. Other methods, such as getShort, do not require such a transformation. And Boolean cannot be cast to String.

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.

image
check disableGlobalTransaction and other type configuration item result is ok.

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.

将配置参数改为application.yml后的问题
5 participants