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

Change the startup parameters of seata-server to support database-storage #790

Merged
merged 17 commits into from
Apr 16, 2019

Conversation

zhangthen
Copy link
Contributor

@zhangthen zhangthen added this to the 0.5.0 milestone Apr 15, 2019
# globe session size , if exceeded throws exceptions
max-global-session-size = 512
# file buffer size , if exceeded allocate new buffer
file-write-buffer-cache-size = 16384
Copy link
Member

Choose a reason for hiding this comment

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

should move to under the file node?also modify ConfigurationKey in the code.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should move to under the file node?also modify ConfigurationKey in the code.
image

done.

@codecov-io
Copy link

codecov-io commented Apr 15, 2019

Codecov Report

Merging #790 into develop will decrease coverage by 0.28%.
The diff coverage is 11.25%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #790      +/-   ##
=============================================
- Coverage      34.22%   33.93%   -0.29%     
+ Complexity       888      886       -2     
=============================================
  Files            215      217       +2     
  Lines           8301     8368      +67     
  Branches         996     1010      +14     
=============================================
- Hits            2841     2840       -1     
- Misses          5119     5184      +65     
- Partials         341      344       +3
Impacted Files Coverage Δ Complexity Δ
...ibaba/fescar/core/constants/ConfigurationKeys.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...libaba/fescar/common/exception/StoreException.java 0% <0%> (ø) 0 <0> (?)
...rc/main/java/com/alibaba/fescar/server/Server.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../java/com/alibaba/fescar/core/store/StoreMode.java 0% <0%> (ø) 0 <0> (?)
...va/com/alibaba/fescar/common/util/StringUtils.java 7.57% <0%> (-13.26%) 6 <0> (ø)
...a/com/alibaba/fescar/server/store/StoreConfig.java 80% <100%> (ø) 4 <3> (ø) ⬇️
...m/alibaba/fescar/server/session/SessionHolder.java 58.82% <54.54%> (-5.24%) 14 <3> (-1)

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 7ba3f7a...7c1ff79. Read the comment docs.

ROOT_SESSION_MANAGER = new DefaultSessionManager(ROOT_SESSION_MANAGER_NAME);
public static void init(String mode) throws IOException {
if(StringUtils.isBlank(mode)){
mode = CONFIG.getConfig("store.mode");
Copy link
Member

Choose a reason for hiding this comment

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

store.mode,store.file.dir-> static final, new file add copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

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

store.mode,store.file.dir-> static final, new file add copyright

done.

/**
* The constant STORE_FILE_PREFIX
*/
public static final String STORE_FILE_PREFIX = "file.";
Copy link
Contributor

Choose a reason for hiding this comment

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

lack DB_PREFIX

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe STORE_FILE_PREFIX = STORE_PREFIX + "file."?
not STORE_FILE_PREFIX = "file."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CoffeeLatte007 done, exclude DB_PREFIX which is in another PR after 0.5.0

@@ -71,5 +87,5 @@
/**
* The constant SERVICE_SESSION_RELOAD_READ_SIZE
*/
public static final String SERVICE_SESSION_RELOAD_READ_SIZE = STORE_PREFIX + "session.reload.read_size";
public static final String SERVICE_SESSION_RELOAD_READ_SIZE = STORE_PREFIX + STORE_FILE_PREFIX + "session.reload.read_size";
Copy link
Contributor

Choose a reason for hiding this comment

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

forget update
STORE_FILE_PREFIX + "session.reload.read_size";

@CoffeeLatte007
Copy link
Contributor

is's good to me . but it has conflicts

# Conflicts:
#	core/src/main/java/com/alibaba/fescar/core/constants/ConfigurationKeys.java
Copy link
Contributor

@CoffeeLatte007 CoffeeLatte007 left a comment

Choose a reason for hiding this comment

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

LGTM

return sm;
}
}
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.

if someone start server like sh startup.sh 8091 /home/admin/ 192.168.0.1 ,I think it should be throw IllegalArgumentException, not return null and use default file mode.

@@ -69,7 +69,8 @@ public void clean() throws Exception {
*/
@Test
public void testRestoredFromFile() throws Exception {
SessionHolder.init(".");
// SessionHolder.init(".");
Copy link
Member

Choose a reason for hiding this comment

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

directly delete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

directly delete

done.

@zhangthen zhangthen merged commit e888f58 into apache:develop Apr 16, 2019
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