The problem with this approach is that NBS uses YDB code by directly linking it without copying or modifying, therefore, in their binary the compatibility information remains the same as in arcadia/ydb.
What is proposed:
We propose to move the construction of the current compatibility information into a separate function and define this function in a separate source file, differing for NBS and YDB. This can be main.cpp or some new file.
How it would look with the main.cpp option:
ydb/core/driver_lib/version/version.cpp
...
TCompatibilityInfo::TCompatibilityInfo() {
...
auto current = MakeCurrentCompatiblityInfo();
...
}
...
How it works now:
Information about compatibility is stored in the form of protobuf in a global object CompatibilityInfo of type TCompatibilityInfo: https://github.com/ydb-platform/ydb/blob/main/ydb/core/driver_lib/version/version.h#L169 To change the compatibility information for binary we need to change the constructor: https://github.com/ydb-platform/ydb/blob/stable-23-3/ydb/core/driver_lib/version/version.cpp#L27
The problem with this approach is that NBS uses YDB code by directly linking it without copying or modifying, therefore, in their binary the compatibility information remains the same as in
arcadia/ydb
.What is proposed:
We propose to move the construction of the current compatibility information into a separate function and define this function in a separate source file, differing for NBS and YDB. This can be main.cpp or some new file.
How it would look with the main.cpp option:
ydb/core/driver_lib/version/version.cpp
ydb/apps/ydbd/main.cpp
cloud/blockstore/apps/server/main.cpp and cloud/filestore/apps/server/main.cpp