Yingchun Lai has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21295 )

Change subject: KUDU-3371 check for RocksDB dir presence upon opening FSManager
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21295/1/src/kudu/fs/data_dirs.cc
File src/kudu/fs/data_dirs.cc:

http://gerrit.cloudera.org:8080/#/c/21295/1/src/kudu/fs/data_dirs.cc@212
PS1, Line 212:     // Initialize the directory only if it's healthy.
             :     // Note: the unhealthy directories wi
> I'm not sure I understand: what exactly makes them not suitable to have in
There are some interesting disscussions, 
https://stackoverflow.com/questions/3905784/what-not-to-do-in-a-constructor.

Prepare() contains some complex operations, including opening the rocksdb 
instance, it may open dozens of files and may last a long time, and asserts may 
happen in it.
Based on the "lazy initialization" design concept(If I understand correctly), 
Kudu code separates the logic of object constructor and initializer to 
separated constructor and Init() functions. The object is constructed in 
constructor but is defered to be initialized in the Init() function.

The code under 'if (new_dir->instance()->healthy())' clause is similar to an 
Init() procedure.



--
To view, visit http://gerrit.cloudera.org:8080/21295
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iab4bffc6b902ab96edf0ca6c44f51c8db2670d52
Gerrit-Change-Number: 21295
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <laiyingc...@apache.org>
Gerrit-Reviewer: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <laiyingc...@apache.org>
Gerrit-Comment-Date: Sun, 19 May 2024 16:04:52 +0000
Gerrit-HasComments: Yes

Reply via email to