accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ACCUMULO-1703) Thrift generated code isn't properly checked for optional fields
Date Mon, 09 Sep 2013 22:56:54 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-1703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christopher Tubbs updated ACCUMULO-1703:
----------------------------------------

    Priority: Minor  (was: Major)
    
> Thrift generated code isn't properly checked for optional fields
> ----------------------------------------------------------------
>
>                 Key: ACCUMULO-1703
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1703
>             Project: Accumulo
>          Issue Type: Bug
>            Reporter: Christopher Tubbs
>            Priority: Minor
>             Fix For: 1.6.0
>
>
> In our thrift definition files, we declare some fields as optional. However, we don't
actually check to see if they are sent. This may be okay for Objects, which we can check for
null, but it won't work for checking optional primitives.
> Example:
> ProxyServer.createBatchScanner() accepts a BatchScanOptions object, which has the number
of threads as an optional parameter. Instead of calling opts.threads, we should check if opts.isSetThreads()
is true, and then retrieve it with opts.getThreads().
> This is an essential check for all optional arguments (non-optional args are validated
by the generated validate() method).
> The importance of the optional field is high, if we want to support RPC compatibility
across versions. As far as I know, this is one of the goals of the client proxy. So, we must
use the thrift features (such as the optional flag) correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message