Re: [Proposal] Return Optional in Catalog.getDb and Database.getTable

2021-08-05 Thread 迟成
A more detailed description https://github.com/apache/incubator-doris/issues/6386 在 2021/8/5 下午2:30,“陈明雨” 写入: Optional.orElseThrow will throw an exception if not exist? But for most replay edit log logic, if table does not exist, we should just return, not throw exception. --

Re:Re: [Proposal] Return Optional in Catalog.getDb and Database.getTable

2021-08-04 Thread 陈明雨
Optional.orElseThrow will throw an exception if not exist? But for most replay edit log logic, if table does not exist, we should just return, not throw exception. -- 此致!Best Regards 陈明雨 Mingyu Chen Email: chenmin...@apache.org 在 2021-08-03 19:54:42,"Shuo Wang" 写道: >+1 > >迟成 于2021年8月3

Re: [Proposal] Return Optional in Catalog.getDb and Database.getTable

2021-08-03 Thread Shuo Wang
+1 迟成 于2021年8月3日周二 下午6:16写道: > The replay NPE bug has caused many cases that make all FE down. > To avoid this from happening, It’s necessary to check null when get DB and > Table object at any time. > I suggest that returns Optional object when get DB and Table object to > normalize the null ch

[Proposal] Return Optional in Catalog.getDb and Database.getTable

2021-08-03 Thread 迟成
The replay NPE bug has caused many cases that make all FE down. To avoid this from happening, It’s necessary to check null when get DB and Table object at any time. I suggest that returns Optional object when get DB and Table object to normalize the null check. DdlException and AnalysisException