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 issue with segment metadata cache and complex types when doing out of order upgrades from 0.22 #14948

Merged

Conversation

clintropolis
Copy link
Member

Description

Fixes an issue with complex type handling that was intended to be fixed as part of #12016 to handle cases where the broker is updated before historical and realtime nodes.

Since complex types were sending back the response with just the complex type name, the valueType was still null resulting in errors of the form:

org.apache.druid.java.util.common.ISE: Encountered null type for column [theta_user]
	at org.apache.druid.sql.calcite.schema.SegmentMetadataCache.lambda$buildDruidTable$13(SegmentMetadataCache.java:825) ~[classes/:?]
	at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
...

I will update the release notes of 0.23 to indicate that the brokers must be updated last for now...

This PR has:

  • been self-reviewed.
  • a release note entry in the PR description.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • been tested in a test Druid cluster.

Copy link
Contributor

@churromorales churromorales left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -961,6 +961,9 @@
// likelyhood of upgrading from some version lower than 0.23 is low
try {
valueType = ColumnType.fromString(entry.getValue().getType());
if (valueType == null) {
valueType = ColumnType.ofComplex(entry.getValue().getType());

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [ColumnAnalysis.getType](1) should be avoided because it has been deprecated.
Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@asdf2014 asdf2014 merged commit 5cecf6c into apache:master Sep 12, 2023
@clintropolis clintropolis deleted the fix-out-of-order-upgrade-from-22-complex branch September 12, 2023 03:09
@LakshSingla LakshSingla added this to the 28.0 milestone Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants