Skip to content

serialize legacy as false for scan query for rolling downgrade/upgrade#16793

Merged
abhishekagarwal87 merged 6 commits intoapache:masterfrom
clintropolis:fix-legacy-scan-backwards-compat
Jul 25, 2024
Merged

serialize legacy as false for scan query for rolling downgrade/upgrade#16793
abhishekagarwal87 merged 6 commits intoapache:masterfrom
clintropolis:fix-legacy-scan-backwards-compat

Conversation

@clintropolis
Copy link
Copy Markdown
Member

@clintropolis clintropolis commented Jul 24, 2024

Fixes rolling downgrades/upgrades after #16659 by hard coding scan query "legacy":false since it is a required property during deserialization.

return columnTypes;
}

@JsonProperty("legacy")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could use a javadoc and a @Deprecated annotation. Javadoc could be something like:

/**
 * Prior to PR https://github.com/apache/druid/pull/16659 (Druid 31) data servers require
 * the "legacy" parameter to be set to a non-null value. For compatibility with older data
 * servers during rolling updates, we need to write out "false".
 */

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added, thanks 👍

.dataSource("source")
.intervals(intervalSpec)
.build();
Assert.assertFalse(query.isLegacy());

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [ScanQuery.isLegacy](1) should be avoided because it has been deprecated.
@github-actions github-actions Bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Jul 25, 2024
@clintropolis clintropolis changed the title serialize legacy as false for scan query for rolling upgrades serialize legacy as false for scan query for rolling downgrade/upgrade Jul 25, 2024
@abhishekagarwal87 abhishekagarwal87 merged commit 14954c7 into apache:master Jul 25, 2024
@clintropolis clintropolis deleted the fix-legacy-scan-backwards-compat branch July 25, 2024 09:34
sreemanamala pushed a commit to sreemanamala/druid that referenced this pull request Aug 6, 2024
apache#16793)

Fixes rolling downgrades/upgrades after apache#16659 by hard coding scan query "legacy":false since it is a required property during deserialization.
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Area - Querying Compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants