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

[Backport 2.x] Fix grammar in log warnings. #3088

Merged
merged 1 commit into from
Oct 21, 2024
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 @@ -34,7 +34,7 @@ public void queryExceedResourceLimitShouldFail() throws IOException {
assertEquals(500, exception.getResponse().getStatusLine().getStatusCode());
assertThat(
exception.getMessage(),
Matchers.containsString("resource is not enough to run the" + " query, quit."));
Matchers.containsString("insufficient resources to run the query, quit."));

// update plugins.ppl.query.memory_limit to default value 85%
updateClusterSettings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public <R, C> R accept(PhysicalPlanNodeVisitor<R, C> visitor, C context) {
@Override
public void open() {
if (!this.monitor.isHealthy()) {
throw new IllegalStateException("resource is not enough to run the query, quit.");
throw new IllegalStateException("insufficient resources to run the query, quit.");
}
delegate.open();
}
Expand All @@ -68,7 +68,7 @@ public boolean hasNext() {
public ExprValue next() {
boolean shouldCheck = (++nextCallCount % NUMBER_OF_NEXT_CALL_TO_CHECK == 0);
if (shouldCheck && !this.monitor.isHealthy()) {
throw new IllegalStateException("resource is not enough to load next row, quit.");
throw new IllegalStateException("insufficient resources to load next row, quit.");
}
return delegate.next();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public boolean isMemoryHealthy(long limitBytes) {
} else {
log.warn("Memory usage:{} exceed limit:{}", memoryUsage, limitBytes);
if (randomFail.shouldFail()) {
log.warn("Fast failure the current request");
log.warn("Fast failing the current request");
throw new MemoryUsageExceedFastFailureException();
} else {
throw new MemoryUsageExceedException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void openExceedResourceLimit() {

IllegalStateException exception =
assertThrows(IllegalStateException.class, () -> monitorPlan.open());
assertEquals("resource is not enough to run the query, quit.", exception.getMessage());
assertEquals("insufficient resources to run the query, quit.", exception.getMessage());
}

@Test
Expand Down Expand Up @@ -79,7 +79,7 @@ void nextExceedResourceLimit() {

IllegalStateException exception =
assertThrows(IllegalStateException.class, () -> monitorPlan.next());
assertEquals("resource is not enough to load next row, quit.", exception.getMessage());
assertEquals("insufficient resources to load next row, quit.", exception.getMessage());
}

@Test
Expand Down
Loading