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

Conversation

spena
Copy link
Member

@spena spena commented Dec 2, 2020

Description

What behavior do you want to change, why, how does your patch achieve the changes?
Fixes #6249

Add a better error message when the issue in #6249 is thrown.

ksql> CREATE TABLE MSG_COUNT WITH (KAFKA_TOPIC='MSG_COUNT', PARTITIONS=1, REPLICAS=1) AS SELECT
  'X' X,
  COUNT(*) MSG_CT
FROM PAGEVIEWS PAGEVIEWS
GROUP BY 'X'
EMIT CHANGES;

ksql> SELECT * FROM MSG_COUNT WHERE X='X';
Materialized data for key ['X'] is not available yet. Please try again later.

There was another fix that retry the failing request here (#6633), but seems pull queries must fail fast. Instead, the user should be warned about the issue and let them know they need to retry.

Testing done

Uni tests
Manually

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@spena spena added this to the 0.15.0 milestone Dec 2, 2020
@spena spena requested review from AlanConfluent and a team December 2, 2020 20:20
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.

Copy link
Member

@AlanConfluent AlanConfluent left a comment

Choose a reason for hiding this comment

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

LGTM

@spena spena merged commit e6ba436 into confluentinc:master Dec 3, 2020
@spena spena deleted the fixweek_pull_queries branch December 3, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyQueryMetadata not available for state store Aggregate-Aggregate-Materialize and key Struct{X=X}
2 participants