Skip to content

Commit 4e4adfa

Browse files
committed
[common] upgrade the priority of request: GET_METADATA & UPDATE_METADATA
1 parent abdb4f4 commit 4e4adfa

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

fluss-rpc/src/main/java/com/alibaba/fluss/rpc/netty/server/RpcRequest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ public long getStartTimeMs() {
117117
* stability of the cluster when the network load is high.
118118
*/
119119
public int getPriority() {
120-
if (apiKey == ApiKeys.FETCH_LOG.id
121-
&& ((FetchLogRequest) message).getFollowerServerId() >= 0) {
120+
if ((apiKey == ApiKeys.FETCH_LOG.id
121+
&& ((FetchLogRequest) message).getFollowerServerId() >= 0)) {
122122
return 1;
123+
} else if (apiKey == ApiKeys.GET_METADATA.id || apiKey == ApiKeys.UPDATE_METADATA.id) {
124+
return 2;
123125
}
124-
125126
return 0;
126127
}
127128

fluss-server/src/test/java/com/alibaba/fluss/server/testutils/FlussClusterExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public TabletServerGateway newTabletServerClientForNode(int serverId) {
359359
public void waitUtilAllGatewayHasSameMetadata() {
360360
for (AdminReadOnlyGateway gateway : collectAllRpcGateways()) {
361361
retry(
362-
Duration.ofMinutes(1),
362+
Duration.ofMinutes(2),
363363
() -> {
364364
MetadataResponse response = gateway.metadata(new MetadataRequest()).get();
365365
assertThat(response.hasCoordinatorServer()).isTrue();

0 commit comments

Comments
 (0)