[ 
https://issues.apache.org/jira/browse/DRILL-5723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151135#comment-16151135
 ] 

ASF GitHub Bot commented on DRILL-5723:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/923#discussion_r136656530
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
 ---
    @@ -70,11 +69,13 @@
      *  </p>
      */
     
    -public class SystemOptionManager extends BaseOptionManager implements 
OptionManager, AutoCloseable {
    +public class SystemOptionManager extends BaseOptionManager implements 
AutoCloseable {
       private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);
     
    -  private CaseInsensitiveMap<OptionValidator> VALIDATORS;
    -  public void populateValidators() {
    +  public static final CaseInsensitiveMap<OptionValidator> 
DEFAULT_VALIDATORS =
    --- End diff --
    
    This change reverses a change made by Jyothsna. While it seems reasonable 
to create a static table of validators, there is a subtle problem which 
Jyothsna's fix addressed.
    
    Under normal operation, we have exactly one Drillbit per process and thus 
exactly one system option manager.
    
    But, we have unit tests that create multiple Drillbits per process. This is 
the most convenient way to test concurrency issues in unit tests. In general, 
each Drillbit could define a different default value for the system/session 
option; perhaps to check forward/backward compatibility when the time comes to 
support rolling upgrades.
    
    In this model, each Drillbit will have a slightly different set of 
defaults. Thus, the option validator table must be a member variable of the 
system option manager; it cannot be global.
    
    Note also, in the existing tests with multiple Drillbits, a global table 
runs into a race condition during reading defaults from the config file if we 
use a single table. But, if we have a separate table per Drillbit, the race 
condition disappears.


> Support System/Session Internal Options
> ---------------------------------------
>
>                 Key: DRILL-5723
>                 URL: https://issues.apache.org/jira/browse/DRILL-5723
>             Project: Apache Drill
>          Issue Type: New Feature
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>
> This is a feature proposed by [~ben-zvi].
> Currently all the options are accessible by the user in sys.options. We would 
> like to add internal options which can be altered, but are not visible in the 
> sys.options table. These internal options could be seen by another alias 
> select * from internal.options. The intention would be to put new options we 
> weren't comfortable with exposing to the end user in this table.
> After the options and their corresponding features are considered stable they 
> could be changed to appear in the sys.option table.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to