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

Move lz4 decompress to backend executor #1237

Merged
merged 7 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ private void listenChanges() {
if ("invalid".equals(args[0])) {
HugeType type = (HugeType) args[1];
Id id = (Id) args[2];
this.arrayCaches.remove(type, id);
if (id.number() && id.asLong() > 0) {
this.arrayCaches.remove(type, id);
Copy link
Contributor

Choose a reason for hiding this comment

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

move to remove() method

}

id = generateId(type, id);
Object value = this.idCache.get(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,6 @@ public void notifyCache(HugeType type, Id id) {
eventHub = this.params.graphEventHub();
} else if (type.isSchema()) {
eventHub = this.params.schemaEventHub();
if (id.number() && id.asLong() < 0) {
return;
}
} else {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,23 @@ public static synchronized CoreOptions instance() {
public static final ConfigOption<Integer> RAFT_RPC_BUF_LOW_WATER_MARK =
new ConfigOption<>(
"raft.rpc_buf_low_water_mark",
"",
"The ChannelOutboundBuffer's low water mark of netty, " +
"when buffer size less than this size, the method " +
"ChannelOutboundBuffer.isWritable() will return true, " +
"it means that low downstream pressure or good network",
positiveInt(),
10 * 1024 * 1024
);

public static final ConfigOption<Integer> RAFT_RPC_BUF_HIGH_WATER_MARK =
new ConfigOption<>(
"raft.rpc_buf_high_water_mark",
"",
"The ChannelOutboundBuffer's high water mark of netty, " +
"only when buffer size exceed this size, the method " +
"ChannelOutboundBuffer.isWritable() will return false, " +
"it means that the downstream pressure is too great to " +
"process the request or network is very congestion, " +
"upstream needs to limit rate at this time",
positiveInt(),
20 * 1024 * 1024
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static BytesBuffer compress(byte[] bytes, int blockSize,
throw new BackendException("Failed to compress", e);
}
/*
* If need perform reading outside the method,
* If need to perform reading outside the method,
* remember to call forReadWritten()
*/
return buf;
Expand Down Expand Up @@ -87,7 +87,7 @@ public static BytesBuffer decompress(byte[] bytes, int blockSize,
throw new BackendException("Failed to decompress", e);
}
/*
* If need perform reading outside the method,
* If need to perform reading outside the method,
* remember to call forReadWritten()
*/
return buf;
Expand Down