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

DRILL-8502: some boot options with drill.exec.options prefix are missed in configuration options #2923

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

rymarm
Copy link
Member

@rymarm rymarm commented Jul 9, 2024

DRILL-8502: Some boot options with drill.exec.options prefix are missed in configuration options

Description

This PR removes 3 unused properties and 1 duplicate property and makes drill.exec.options.drill.exec.testing.controls visible all the time, not only when assertions mode is enabled.

During an investigation of the Drill configuration system, I noticed Drill has several system options(drill.exec.options.* properties), which are absent in SystemOptionManager, but present in DrillConfig:

apache drill> select name from sys.boot where name like 'drill.exec.options%' AND name not in (select concat('drill.exec.options.', name) from sys.internal_options union all select concat('drill.exec.options.', name) from sys.options);
+-------------------------------------------------------+
|                         name                          |
+-------------------------------------------------------+
| drill.exec.options.drill.exec.testing.controls        |
| drill.exec.options.exec.hashagg.max_batches_in_memory |
| drill.exec.options.exec.hashagg.num_rows_in_batch     |
| drill.exec.options.exec.hashjoin.mem_limit            |
| drill.exec.options.exec.return_result_set_for_ddl     |
+-------------------------------------------------------+

I've analyzed the Drill code and concluded:

  1. drill.exec.options.drill.exec.testing.controls - is set to empty in drill-module.conf in java-exec jar. This property becomes available only when an assertions mode is enabled. All the other time this option is never used and should not be initialized. Even with enabled assertions mode a null value is acceptable.
    DRILLBIT_CONTROLS_VALIDATOR along with its default value is added to SystemOptionManager only when an assertions mode is enabled, but all the other time, drill.exec.options.drill.exec.testing.controls is present only in DrillConfig. I think it's a little confusing, that a system option may be present, but may not. So I reverted a change that adds logic of adding the validator when the assertions mode is enabled. Commit which brings this logic: 2af6340#diff-f17deea2cf176841c1056a79613481f2b9c42f29eaa151958eaabf14169d3e24R118-R120
  2. drill.exec.options.exec.hashagg.max_batches_in_memory - is set to 65536 in drill-module.conf in java-exec jar. This property is never used.
  3. drill.exec.options.exec.hashagg.num_rows_in_batch - is set to 128 in drill-module.conf in java-exec jar. This property is never used.
  4. drill.exec.options.exec.hashjoin.mem_limit - is set to 0 in drill-module.conf in java-exec jar. This property is never used.
  5. drill.exec.options.exec.return_result_set_for_ddl - is set to true. This property is probably a typo of drill.exec.options.exec.query.return_result_set_for_ddl.

@rymarm
Copy link
Member Author

rymarm commented Jul 9, 2024

@jnturton @cgivre What do you say about this?

Copy link
Contributor

@cgivre cgivre left a comment

Choose a reason for hiding this comment

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

LGTM +1

@cgivre
Copy link
Contributor

cgivre commented Jul 16, 2024

@jnturton Do you want to weigh in on this one?

@cgivre
Copy link
Contributor

cgivre commented Jul 18, 2024

@rymarm Would you mind please creating a JIRA issue for this?

@rymarm rymarm changed the title Clean duplicated and unused options DRILL-8502: some boot options with drill.exec.options prefix are missed in configuration options Jul 18, 2024
@rymarm
Copy link
Member Author

rymarm commented Jul 18, 2024

@cgivre yes, sure. I've updated the PR with Jira ticket information.

@rymarm rymarm added bug regression Fixes a bug affecting functionality that worked in a previous release and removed bug labels Jul 18, 2024
@cgivre cgivre merged commit e2e59a4 into apache:master Jul 19, 2024
8 checks passed
@jnturton
Copy link
Contributor

Sorry I missed this at the time. Thanks for the cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-cleanup regression Fixes a bug affecting functionality that worked in a previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants