Open SeanHai opened 1 year ago
Hi! Has this issue been closed? If not, please assign it to me. I am a graduate student in the University of Science and Technology of China. I am interested in distributed systems and storage systems. I think this task is a good first issue for me. With some experience in CPP development, I believe I can complete it well. Thank you for considering my request.
@V4yne Welcome!
Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)
Provide default values for configuration items to avoid process hangs due to missing. There are lots of code like 'conf.GetValueFatalIfFail(confName, confValue)'. If a configuration item is missing:
F 2023-06-21T10:06:04.680009+0800 6 s3_adapter.cpp:85] Check failure stack trace: Aborted at 1687313164 (unix time) try "date -d @1687313164" if you are using GNU date PC: @ 0x0 (unknown) SIGABRT (@0x6) received by PID 6 (TID 0x7fcbd210d4c0) from PID 6; stack trace: @ 0x7fcbd014e0e0 (unknown) @ 0x7fcbce805fff gsignal @ 0x7fcbce80742a abort @ 0x55bec06199ec google::FlushAndAbort() @ 0x55bec0616c3e google::LogMessage::Fail() @ 0x55bec0616b87 google::LogMessage::SendToLog() @ 0x55bec06163b0 google::LogMessage::Flush() @ 0x55bec0619380 google::LogMessageFatal::~LogMessageFatal() @ 0x55bebfde1858 curve::common::InitS3AdaptorOptionExceptS3InfoOption() @ 0x55bebf94fe43 curvefs::mds::MDS::InitFsManagerOptions() @ 0x55bebf950179 curvefs::mds::MDS::Init() @ 0x55bebf94c42a main @ 0x7fcbce7f32e1 __libc_start_main @ 0x55bebf94bc4a _start @ 0x0 (unknown)
For example: https://github.com/opencurve/curve/blob/8db694299e7952974233c1a738d3099cb7b448d1/src/mds/server/mds.cpp#L479
code like this can provide default value in struct FileRecordOptions and change code to conf_->GetUint32Value(...). If this conf item missed in conf the process will not exit.
Describe the solution you'd like (描述你期望的解决方法)
Describe alternatives you've considered (描述你想到的折衷方案)
Additional context/screenshots (更多上下文/截图)