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

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

Merged

Conversation

clintropolis
Copy link
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.

@@ -443,6 +443,12 @@ public List<ColumnType> getColumnTypes()
return columnTypes;
}

@JsonProperty("legacy")
Copy link
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
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 Note test

Invoking
ScanQuery.isLegacy
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
88 checks passed
@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.

4 participants