-
Notifications
You must be signed in to change notification settings - Fork 512
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
Move lz4 decompress to backend executor #1237
Changes from 2 commits
445a2bf
f3ac544
408689e
d1189c7
25f7e50
ec8cb4d
21178e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -249,6 +249,22 @@ public static synchronized CoreOptions instance() { | |
60000 | ||
); | ||
|
||
public static final ConfigOption<Integer> RAFT_RPC_BUF_LOW_WATER_MARK = | ||
new ConfigOption<>( | ||
"raft.rpc_buf_low_water_mark", | ||
"", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer write some description |
||
positiveInt(), | ||
10 * 1024 * 1024 | ||
); | ||
|
||
public static final ConfigOption<Integer> RAFT_RPC_BUF_HIGH_WATER_MARK = | ||
new ConfigOption<>( | ||
"raft.rpc_buf_high_water_mark", | ||
"", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
positiveInt(), | ||
20 * 1024 * 1024 | ||
); | ||
|
||
public static final ConfigOption<Integer> RATE_LIMIT_WRITE = | ||
new ConfigOption<>( | ||
"rate_limit.write", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,10 @@ public static BytesBuffer compress(byte[] bytes, int blockSize, | |
} catch (IOException e) { | ||
throw new BackendException("Failed to compress", e); | ||
} | ||
/* | ||
* If need perform reading outside the method, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to perform |
||
* remember to call forReadWritten() | ||
*/ | ||
return buf; | ||
} | ||
|
||
|
@@ -82,6 +86,10 @@ public static BytesBuffer decompress(byte[] bytes, int blockSize, | |
} catch (IOException e) { | ||
throw new BackendException("Failed to decompress", e); | ||
} | ||
/* | ||
* If need perform reading outside the method, | ||
* remember to call forReadWritten() | ||
*/ | ||
return buf; | ||
} | ||
} |
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.
add some comment