box: add error code for SSLError
Applier uses box_error_code() to for better logging: - It remembers tha last raised error code and skips logging if the new error code is the same. - It logs "will retry every X seconds" only for retryable error codes (for example, ER_SYSTEM) while for non-retryable errors (for example, ER_PROC_LUA) the message isn't logged. box_error_code() returns ER_PROC_LUA for SSLError, which is confusing and would result in inconsistent logging in applier if we made SSLError retryable. Let's add a separate error code for this error (ER_SSL) and introduce a test case that checks that box_error_code() works as expected for all kinds of errors. Follow-up commit a7028dde ("Add SSL iostream stub"). Needed for https://github.com/tarantool/tarantool-ee/issues/107 NO_DOC=internal NO_CHANGELOG=internal
Showing
- src/box/errcode.h 1 addition, 0 deletionssrc/box/errcode.h
- src/box/error.cc 3 additions, 0 deletionssrc/box/error.cc
- src/lib/core/ssl_error.cc 15 additions, 0 deletionssrc/lib/core/ssl_error.cc
- src/lib/core/ssl_error.h 7 additions, 1 deletionsrc/lib/core/ssl_error.h
- test/box/error.result 1 addition, 0 deletionstest/box/error.result
- test/unit/CMakeLists.txt 1 addition, 1 deletiontest/unit/CMakeLists.txt
- test/unit/error.c 44 additions, 1 deletiontest/unit/error.c
- test/unit/error.result 14 additions, 1 deletiontest/unit/error.result
Loading