Skip to content

Commit

Permalink
Return SYSTEM_BUSY if PutMessageStatus is OS_PAGE_CACHE_BUSY
Browse files Browse the repository at this point in the history
  • Loading branch information
biningo committed Apr 23, 2024
1 parent f7dbc94 commit 91c4f43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ private RemotingCommand handlePutMessageResult(PutMessageResult putMessageResult
"the broker's disk is full [" + diskUtil() + "], messages are put to the slave, message store has been shut down, etc.");
break;
case OS_PAGE_CACHE_BUSY:
response.setCode(ResponseCode.SYSTEM_ERROR);
response.setCode(ResponseCode.SYSTEM_BUSY);
response.setRemark("[PC_SYNCHRONIZED]broker busy, start flow control for a while");
break;
case LMQ_CONSUME_QUEUE_NUM_EXCEEDED:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void testProcessRequest_FlushSlaveTimeout() throws Exception {
public void testProcessRequest_PageCacheBusy() throws Exception {
when(messageStore.asyncPutMessage(any(MessageExtBrokerInner.class))).
thenReturn(CompletableFuture.completedFuture(new PutMessageResult(PutMessageStatus.OS_PAGE_CACHE_BUSY, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR))));
assertPutResult(ResponseCode.SYSTEM_ERROR);
assertPutResult(ResponseCode.SYSTEM_BUSY);
}

@Test
Expand Down

0 comments on commit 91c4f43

Please sign in to comment.