vagetablechicken opened a new issue #3282: Opening data dirs parallelly is not thread-safe URL: https://github.com/apache/incubator-doris/issues/3282 **Describe the bug** 162b1c5d8bfd8afb7b01951ea5c5a79d1ffe1679 makes the data dirs init parallelly, but I found it's not thread-safe. When be is starting, it may get this error: ``` [data_dir.cpp:249] fail to find file system, path=/xxx ``` I didn't notice that `DataDir::_init_file_system()` may have race conditions. `getmntent()` value is `MT-Unsafe race:mntentbuf locale` We have two solutions: 1. use `getmntent_r()` instread, `getmntent_r()` value is MT-Safe locale. 1. split `_init_meta()`(open rocksdb), just `_init_meta()` in parallel. Keep other parts of data dir init in sequential order.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org