Skip to content

Commit

Permalink
Ydb stable 23-3-17
Browse files Browse the repository at this point in the history
x-stable-origin-commit: b811b1684545fab05c671444cb7194cf6d39d28d
  • Loading branch information
dcherednik committed Nov 16, 2023
1 parent e84c813 commit 568ecc4
Show file tree
Hide file tree
Showing 229 changed files with 10,410 additions and 1,239 deletions.
7 changes: 7 additions & 0 deletions library/cpp/actors/core/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@
} \
} while (0) /**/

#define LOG_LOG_S_THROTTLE(throttler, actorCtxOrSystem, priority, component, stream) \
do { \
if ((throttler).Kick()) { \
LOG_LOG_S(actorCtxOrSystem, priority, component, stream); \
} \
} while (0) /**/

#define TRACE_EVENT(component) \
const auto& currentTracer = component; \
if (ev->HasEvent()) { \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
library-cpp-lwtrace
cpp-monlib-dynamic_counters
cpp-monlib-metrics
service-pages-resources
service-pages-tablesorter
cpp-openssl-init
library-cpp-packedtypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
library-cpp-lwtrace
cpp-monlib-dynamic_counters
cpp-monlib-metrics
service-pages-resources
service-pages-tablesorter
cpp-openssl-init
library-cpp-packedtypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
library-cpp-lwtrace
cpp-monlib-dynamic_counters
cpp-monlib-metrics
service-pages-resources
service-pages-tablesorter
cpp-openssl-init
library-cpp-packedtypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
library-cpp-lwtrace
cpp-monlib-dynamic_counters
cpp-monlib-metrics
service-pages-resources
service-pages-tablesorter
cpp-openssl-init
library-cpp-packedtypes
Expand Down
1 change: 1 addition & 0 deletions library/cpp/actors/interconnect/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ PEERDIR(
library/cpp/lwtrace
library/cpp/monlib/dynamic_counters
library/cpp/monlib/metrics
library/cpp/monlib/service/pages/resources
library/cpp/monlib/service/pages/tablesorter
library/cpp/openssl/init
library/cpp/packedtypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# original buildsystem will not be accepted.


add_subdirectory(resources)
add_subdirectory(tablesorter)

add_library(monlib-service-pages)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# original buildsystem will not be accepted.


add_subdirectory(resources)
add_subdirectory(tablesorter)

add_library(monlib-service-pages)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# original buildsystem will not be accepted.


add_subdirectory(resources)
add_subdirectory(tablesorter)

add_library(monlib-service-pages)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# original buildsystem will not be accepted.


add_subdirectory(resources)
add_subdirectory(tablesorter)

add_library(monlib-service-pages)
Expand Down
6 changes: 3 additions & 3 deletions library/cpp/monlib/service/pages/html_mon_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ void THtmlMonPage::Output(NMonitoring::IMonHttpRequest& request) {
if (!!Title) {
out << "<title>" << Title << "</title>\n";
}
out << "<link rel='stylesheet' href='https://yastatic.net/bootstrap/3.3.1/css/bootstrap.min.css'>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/jquery/2.1.3/jquery.min.js'></script>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/bootstrap/3.3.1/js/bootstrap.min.js'></script>\n";
out << "<link rel='stylesheet' href='/static/css/bootstrap.min.css'>\n";
out << "<script language='javascript' type='text/javascript' src='/static/js/jquery.min.js'></script>\n";
out << "<script language='javascript' type='text/javascript' src='/static/js/bootstrap.min.js'></script>\n";

if (OutputTableSorterJsCss) {
out << "<link rel='stylesheet' href='/jquery.tablesorter.css'>\n";
Expand Down
6 changes: 3 additions & 3 deletions library/cpp/monlib/service/pages/index_mon_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ TIndexMonPage* TIndexMonPage::FindIndexPage(const TString& relativePath) {
}

void TIndexMonPage::OutputCommonJsCss(IOutputStream& out) {
out << "<link rel='stylesheet' href='https://yastatic.net/bootstrap/3.3.1/css/bootstrap.min.css'>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/jquery/2.1.3/jquery.min.js'></script>\n";
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/bootstrap/3.3.1/js/bootstrap.min.js'></script>\n";
out << "<link rel='stylesheet' href='/static/css/bootstrap.min.css'>\n";
out << "<script language='javascript' type='text/javascript' src='/static/js/jquery.min.js'></script>\n";
out << "<script language='javascript' type='text/javascript' src='/static/js/bootstrap.min.js'></script>\n";
}

void TIndexMonPage::OutputHead(IOutputStream& out) {
Expand Down
6 changes: 6 additions & 0 deletions library/cpp/monlib/service/pages/mon_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ namespace NMonitoring {
static const char HTTPNOTFOUND[] = "HTTP/1.1 404 Invalid URI\r\nConnection: Close\r\n\r\nInvalid URL\r\n";
static const char HTTPUNAUTHORIZED[] = "HTTP/1.1 401 Unauthorized\r\nConnection: Close\r\n\r\nUnauthorized\r\n";
static const char HTTPFORBIDDEN[] = "HTTP/1.1 403 Forbidden\r\nConnection: Close\r\n\r\nForbidden\r\n";
static const char HTTPOKJAVASCRIPT_CACHED[] = "HTTP/1.1 200 Ok\r\nContent-Type: text/javascript\r\nCache-Control: public, max-age=31536000\r\nConnection: Close\r\n\r\n";
static const char HTTPOKCSS_CACHED[] = "HTTP/1.1 200 Ok\r\nContent-Type: text/css\r\nCache-Control: public, max-age=31536000\r\nConnection: Close\r\n\r\n";

// Fonts
static const char HTTPOKFONTEOT[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/vnd.ms-fontobject\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTTTF[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/x-font-ttf\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTWOFF[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTWOFF2[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff2\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTEOT_CACHED[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/vnd.ms-fontobject\r\nCache-Control: public, max-age=31536000\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTTTF_CACHED[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/x-font-ttf\r\nCache-Control: public, max-age=31536000\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTWOFF_CACHED[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff\r\nCache-Control: public, max-age=31536000\r\nConnection: Close\r\n\r\n";
static const char HTTPOKFONTWOFF2_CACHED[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff2\r\nCache-Control: public, max-age=31536000\r\nConnection: Close\r\n\r\n";

// Images
static const char HTTPOKPNG[] = "HTTP/1.1 200 Ok\r\nContent-Type: image/png\r\nConnection: Close\r\n\r\n";
Expand Down
12 changes: 6 additions & 6 deletions library/cpp/monlib/service/pages/resource_mon_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ void TResourceMonPage::Output(NMonitoring::IMonHttpRequest& request) {
out << HTTPOKJSON;
break;
case CSS:
out << HTTPOKCSS;
out << (IsCached ? HTTPOKCSS_CACHED : HTTPOKCSS);
break;
case JAVASCRIPT:
out << HTTPOKJAVASCRIPT;
out << (IsCached ? HTTPOKJAVASCRIPT_CACHED : HTTPOKJAVASCRIPT);
break;
case FONT_EOT:
out << HTTPOKFONTEOT;
out << (IsCached ? HTTPOKFONTEOT_CACHED : HTTPOKFONTEOT);
break;
case FONT_TTF:
out << HTTPOKFONTTTF;
out << (IsCached ? HTTPOKFONTTTF_CACHED : HTTPOKFONTTTF);
break;
case FONT_WOFF:
out << HTTPOKFONTWOFF;
out << (IsCached ? HTTPOKFONTWOFF_CACHED : HTTPOKFONTWOFF);
break;
case FONT_WOFF2:
out << HTTPOKFONTWOFF2;
out << (IsCached ? HTTPOKFONTWOFF2_CACHED : HTTPOKFONTWOFF2);
break;
case PNG:
out << HTTPOKPNG;
Expand Down
4 changes: 3 additions & 1 deletion library/cpp/monlib/service/pages/resource_mon_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ namespace NMonitoring {
};

TResourceMonPage(const TString& path, const TString& resourceName,
const EResourceType& resourceType = BINARY)
const EResourceType& resourceType = BINARY, const bool isCached = false)
: IMonPage(path, "")
, ResourceName(resourceName)
, ResourceType(resourceType)
, IsCached(isCached)
{
}

Expand All @@ -38,6 +39,7 @@ namespace NMonitoring {
private:
TString ResourceName;
EResourceType ResourceType;
bool IsCached;
};

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

# This file was generated by the build system used internally in the Yandex monorepo.
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
# like target_include_directories). These modifications will be ported to original
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
# original buildsystem will not be accepted.


get_built_tool_path(
TOOL_rescompiler_bin
TOOL_rescompiler_dependency
tools/rescompiler/bin
rescompiler
)

add_library(service-pages-resources INTERFACE)
target_link_libraries(service-pages-resources INTERFACE
contrib-libs-cxxsupp
yutil
library-cpp-resource
cpp-monlib-dynamic_counters
)

add_global_library_for(service-pages-resources.global service-pages-resources)
target_link_libraries(service-pages-resources.global PUBLIC
contrib-libs-cxxsupp
yutil
library-cpp-resource
cpp-monlib-dynamic_counters
)
target_sources(service-pages-resources.global PRIVATE
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
)
resources(service-pages-resources.global
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
INPUTS
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/css/bootstrap.min.css
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.eot
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.svg
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.ttf
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.woff
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/bootstrap.min.js
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/jquery.min.js
KEYS
static/css/bootstrap.min.css
static/fonts/glyphicons-halflings-regular.eot
static/fonts/glyphicons-halflings-regular.svg
static/fonts/glyphicons-halflings-regular.ttf
static/fonts/glyphicons-halflings-regular.woff
static/js/bootstrap.min.js
static/js/jquery.min.js
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

# This file was generated by the build system used internally in the Yandex monorepo.
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
# like target_include_directories). These modifications will be ported to original
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
# original buildsystem will not be accepted.


get_built_tool_path(
TOOL_rescompiler_bin
TOOL_rescompiler_dependency
tools/rescompiler/bin
rescompiler
)

add_library(service-pages-resources INTERFACE)
target_link_libraries(service-pages-resources INTERFACE
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
library-cpp-resource
cpp-monlib-dynamic_counters
)

add_global_library_for(service-pages-resources.global service-pages-resources)
target_link_libraries(service-pages-resources.global PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
library-cpp-resource
cpp-monlib-dynamic_counters
)
target_sources(service-pages-resources.global PRIVATE
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
)
resources(service-pages-resources.global
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
INPUTS
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/css/bootstrap.min.css
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.eot
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.svg
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.ttf
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.woff
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/bootstrap.min.js
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/jquery.min.js
KEYS
static/css/bootstrap.min.css
static/fonts/glyphicons-halflings-regular.eot
static/fonts/glyphicons-halflings-regular.svg
static/fonts/glyphicons-halflings-regular.ttf
static/fonts/glyphicons-halflings-regular.woff
static/js/bootstrap.min.js
static/js/jquery.min.js
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

# This file was generated by the build system used internally in the Yandex monorepo.
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
# like target_include_directories). These modifications will be ported to original
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
# original buildsystem will not be accepted.


get_built_tool_path(
TOOL_rescompiler_bin
TOOL_rescompiler_dependency
tools/rescompiler/bin
rescompiler
)

add_library(service-pages-resources INTERFACE)
target_link_libraries(service-pages-resources INTERFACE
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
library-cpp-resource
cpp-monlib-dynamic_counters
)

add_global_library_for(service-pages-resources.global service-pages-resources)
target_link_libraries(service-pages-resources.global PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
yutil
library-cpp-resource
cpp-monlib-dynamic_counters
)
target_sources(service-pages-resources.global PRIVATE
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
)
resources(service-pages-resources.global
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
INPUTS
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/css/bootstrap.min.css
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.eot
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.svg
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.ttf
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.woff
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/bootstrap.min.js
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/jquery.min.js
KEYS
static/css/bootstrap.min.css
static/fonts/glyphicons-halflings-regular.eot
static/fonts/glyphicons-halflings-regular.svg
static/fonts/glyphicons-halflings-regular.ttf
static/fonts/glyphicons-halflings-regular.woff
static/js/bootstrap.min.js
static/js/jquery.min.js
)
17 changes: 17 additions & 0 deletions library/cpp/monlib/service/pages/resources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# This file was generated by the build system used internally in the Yandex monorepo.
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
# like target_include_directories). These modifications will be ported to original
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
# original buildsystem will not be accepted.


if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA)
include(CMakeLists.linux-aarch64.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
include(CMakeLists.darwin-x86_64.txt)
elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA)
include(CMakeLists.windows-x86_64.txt)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
include(CMakeLists.linux-x86_64.txt)
endif()
Loading

0 comments on commit 568ecc4

Please sign in to comment.