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

fix: change locate() error message for a more user-friendly message #6709

Merged
merged 1 commit into from
Dec 3, 2020
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 @@ -89,10 +89,11 @@ public List<KsqlPartitionLocation> locate(

// Fail fast if Streams not ready. Let client handle it
if (metadata == KeyQueryMetadata.NOT_AVAILABLE) {
LOG.debug("KeyQueryMetadata not available for state store {} and key {}",
LOG.debug("KeyQueryMetadata not available for state store '{}' and key {}",
stateStoreName, key);
throw new MaterializationException(String.format(
"KeyQueryMetadata not available for state store %s and key %s", stateStoreName, key));
"Materialized data for key %s is not available yet. "
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed the state store %s because seems not useful for the user. The LOG will print it in the ksql.log debugging purposes.

+ "Please try again later.", key));
}

LOG.debug("Handling pull query for key {} in partition {} of state store {}.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void shouldThrowIfMetadataNotAvailable() {

// Then:
assertThat(e.getMessage(), containsString(
"KeyQueryMetadata not available for state store someStoreName and key [1]"));
"Materialized data for key [1] is not available yet. Please try again later."));
}

@Test
Expand Down