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

RocMarshal edited comment on FLINK-33947 at 12/27/23 2:09 PM:
--------------------------------------------------------------

Before officially starting the repair, there are two issues worth discussing:

 
 - First:

Is the *_prefix_* attribute allowed to be {*}_null_{*}?

What are the risks in using *_prefix_* if it is not allowed to be {*}_null_{*}? 
Or will there be any defects?

 

>From the current effect, if the *_prefix_* is {*}_null_{*}, methods such as 
>*_hashCode()_* will result in *_NPE_*

Based on the feedback from the current community regarding the use of this 
class, there should be no instances of using a *_null_* {_}*prefix*{_}, unless 
there are no calls to methods that may result in _*NPE*_

 

There are two corresponding alternative solutions here:

1. It is not allowed for _*prefix*_ to be a *_null_* object, so there will be 
no corresponding method to cause _*NPE*_

2. Alternatively, allow the _*prefix*_ to be a _*null*_ object, but we need to 
design logic to handle _*null*_ situations for methods that may cause _*NPE*_ 
to avoid the occurrence of _*NPE*_

 

 
 - Secondly:

Regarding the mapping bug of _*prefix*_ values in various methods,

Only exists in the _*removeKey* *removeConfiguration*_ methods. We just need to 
fix and add tests


was (Author: rocmarshal):
Before officially starting the repair, there are two issues worth discussing:

 

- First:

Is the *_prefix_* attribute allowed to be {*}_null_{*}?

What are the risks in using *_prefix_* if it is not allowed to be {*}_null_{*}? 
Or will there be any defects?

 

>From the current effect, if the *_prefix_* is {*}_null_{*}, methods such as 
>*_hashCode()_* will result in *_NPE_*

Based on the feedback from the current community regarding the use of this 
class, there should be no instances of using a *_null_* {_}*prefix*{_}, unless 
there are no calls to methods that may result in _*NPE*_

 

There are two corresponding alternative solutions here:

1. It is not allowed for _*prefix*_ to be a *_null_* object, so there will be 
no corresponding method to cause _*NPE*_

2. Alternatively, allow the _*prefix*_ to be a _*null*_ object, but we need to 
design logic to handle _*null*_ situations for methods that may cause _*NPE*_ 
to avoid the occurrence of _*NPE*_

By the way, it's best to modify the _*prefix*_ as _*final*_

 

- Secondly:

Regarding the mapping bug of _*prefix*_ values in various methods,

Only exists in the _*removeKey* *removeConfiguration*_ methods. We just need to 
fix and add tests

> Fix bugs in DelegatingConfiguration missed the prefix mapping 
> --------------------------------------------------------------
>
>                 Key: FLINK-33947
>                 URL: https://issues.apache.org/jira/browse/FLINK-33947
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Core
>            Reporter: RocMarshal
>            Assignee: RocMarshal
>            Priority: Major
>             Fix For: 1.19.0, 1.17.3, 1.18.2
>
>
> It was resulted from 
> [https://github.com/apache/flink/pull/23994#issuecomment-1869905090] 
> -  Check and confirm other potential bug points
> -  Fix the bugs about prefix key mapping when operating.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to