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

Ted Yu edited comment on FLINK-9735 at 7/4/18 11:15 PM:
--------------------------------------------------------

One improvement is to differentiate the return type from the parameter type.
e.g. pass DBOptionsBuilder instance which can be enhanced by the 
OptionsFactory. Before the method returns, {{build}} method is called on the 
builder.

This way, there would be no ambiguity.


was (Author: yuzhih...@gmail.com):
One improvement is to differentiate the return type from the parameter type.
e.g. pass DBOptionsBuilder which can be enhanced by the OptionsFactory. Before 
the method returns, {{build}} method is called on the builder.

This way, there would be no ambiguity.

> Potential resource leak in RocksDBStateBackend#getDbOptions
> -----------------------------------------------------------
>
>                 Key: FLINK-9735
>                 URL: https://issues.apache.org/jira/browse/FLINK-9735
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: vinoyang
>            Priority: Minor
>
> Here is related code:
> {code}
>     if (optionsFactory != null) {
>       opt = optionsFactory.createDBOptions(opt);
>     }
> {code}
> opt, an DBOptions instance, should be closed before being rewritten.
> getColumnOptions has similar issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to