Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -352,11 +352,15 @@ private TSStatus extendRegionsIfNecessary(
result = RpcUtils.SUCCESS_STATUS;
}
} catch (NotEnoughDataNodeException e) {
LOGGER.error("ConfigNode failed to extend Region because there are not enough DataNodes");
String prompt = "ConfigNode failed to extend Region because there are not enough DataNodes";
LOGGER.error(prompt);
result.setCode(TSStatusCode.NOT_ENOUGH_DATA_NODE.getStatusCode());
result.setMessage(prompt);
} catch (StorageGroupNotExistsException e) {
LOGGER.error("ConfigNode failed to extend Region because some StorageGroup doesn't exist.");
String prompt = "ConfigNode failed to extend Region because some StorageGroup doesn't exist.";
LOGGER.error(prompt);
result.setCode(TSStatusCode.STORAGE_GROUP_NOT_EXIST.getStatusCode());
result.setMessage(prompt);
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ public TSStatus write(IConsensusRequest request) {
!stateMachineCondition.await(
config.getReplication().getThrottleTimeOutMs(), TimeUnit.MILLISECONDS);
if (timeout) {
return RpcUtils.getStatus(TSStatusCode.WRITE_PROCESS_REJECT);
return RpcUtils.getStatus(
TSStatusCode.WRITE_PROCESS_REJECT,
"Reject write because there are too many requests need to process");
}
} catch (InterruptedException e) {
logger.error("Failed to throttle down because ", e);
Expand Down