-
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
Change the startup parameters of seata-server to support database-storage #790
Conversation
server/src/main/resources/file.conf
Outdated
# 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 |
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.
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.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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"); |
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.
store.mode,store.file.dir-> static final, new file add copyright
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.
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."; |
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.
lack DB_PREFIX
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.
Maybe STORE_FILE_PREFIX = STORE_PREFIX + "file."?
not STORE_FILE_PREFIX = "file."
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.
@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"; |
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.
forget update
STORE_FILE_PREFIX + "session.reload.read_size";
is's good to me . but it has conflicts |
# Conflicts: # core/src/main/java/com/alibaba/fescar/core/constants/ConfigurationKeys.java
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
return sm; | ||
} | ||
} | ||
return 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.
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("."); |
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.
directly delete
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.
directly delete
done.
#789