Skip to content

Commit 568ecc4

Browse files
committed
Ydb stable 23-3-17
x-stable-origin-commit: b811b1684545fab05c671444cb7194cf6d39d28d
1 parent e84c813 commit 568ecc4

File tree

229 files changed

+10410
-1239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+10410
-1239
lines changed

library/cpp/actors/core/log.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@
122122
} \
123123
} while (0) /**/
124124

125+
#define LOG_LOG_S_THROTTLE(throttler, actorCtxOrSystem, priority, component, stream) \
126+
do { \
127+
if ((throttler).Kick()) { \
128+
LOG_LOG_S(actorCtxOrSystem, priority, component, stream); \
129+
} \
130+
} while (0) /**/
131+
125132
#define TRACE_EVENT(component) \
126133
const auto& currentTracer = component; \
127134
if (ev->HasEvent()) { \

library/cpp/actors/interconnect/CMakeLists.darwin-x86_64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
3232
library-cpp-lwtrace
3333
cpp-monlib-dynamic_counters
3434
cpp-monlib-metrics
35+
service-pages-resources
3536
service-pages-tablesorter
3637
cpp-openssl-init
3738
library-cpp-packedtypes

library/cpp/actors/interconnect/CMakeLists.linux-aarch64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
3333
library-cpp-lwtrace
3434
cpp-monlib-dynamic_counters
3535
cpp-monlib-metrics
36+
service-pages-resources
3637
service-pages-tablesorter
3738
cpp-openssl-init
3839
library-cpp-packedtypes

library/cpp/actors/interconnect/CMakeLists.linux-x86_64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
3333
library-cpp-lwtrace
3434
cpp-monlib-dynamic_counters
3535
cpp-monlib-metrics
36+
service-pages-resources
3637
service-pages-tablesorter
3738
cpp-openssl-init
3839
library-cpp-packedtypes

library/cpp/actors/interconnect/CMakeLists.windows-x86_64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ target_link_libraries(cpp-actors-interconnect PUBLIC
3232
library-cpp-lwtrace
3333
cpp-monlib-dynamic_counters
3434
cpp-monlib-metrics
35+
service-pages-resources
3536
service-pages-tablesorter
3637
cpp-openssl-init
3738
library-cpp-packedtypes

library/cpp/actors/interconnect/ya.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ PEERDIR(
8282
library/cpp/lwtrace
8383
library/cpp/monlib/dynamic_counters
8484
library/cpp/monlib/metrics
85+
library/cpp/monlib/service/pages/resources
8586
library/cpp/monlib/service/pages/tablesorter
8687
library/cpp/openssl/init
8788
library/cpp/packedtypes

library/cpp/monlib/service/pages/CMakeLists.darwin-x86_64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# original buildsystem will not be accepted.
77

88

9+
add_subdirectory(resources)
910
add_subdirectory(tablesorter)
1011

1112
add_library(monlib-service-pages)

library/cpp/monlib/service/pages/CMakeLists.linux-aarch64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# original buildsystem will not be accepted.
77

88

9+
add_subdirectory(resources)
910
add_subdirectory(tablesorter)
1011

1112
add_library(monlib-service-pages)

library/cpp/monlib/service/pages/CMakeLists.linux-x86_64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# original buildsystem will not be accepted.
77

88

9+
add_subdirectory(resources)
910
add_subdirectory(tablesorter)
1011

1112
add_library(monlib-service-pages)

library/cpp/monlib/service/pages/CMakeLists.windows-x86_64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# original buildsystem will not be accepted.
77

88

9+
add_subdirectory(resources)
910
add_subdirectory(tablesorter)
1011

1112
add_library(monlib-service-pages)

library/cpp/monlib/service/pages/html_mon_page.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ void THtmlMonPage::Output(NMonitoring::IMonHttpRequest& request) {
1515
if (!!Title) {
1616
out << "<title>" << Title << "</title>\n";
1717
}
18-
out << "<link rel='stylesheet' href='https://yastatic.net/bootstrap/3.3.1/css/bootstrap.min.css'>\n";
19-
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/jquery/2.1.3/jquery.min.js'></script>\n";
20-
out << "<script language='javascript' type='text/javascript' src='https://yastatic.net/bootstrap/3.3.1/js/bootstrap.min.js'></script>\n";
18+
out << "<link rel='stylesheet' href='/static/css/bootstrap.min.css'>\n";
19+
out << "<script language='javascript' type='text/javascript' src='/static/js/jquery.min.js'></script>\n";
20+
out << "<script language='javascript' type='text/javascript' src='/static/js/bootstrap.min.js'></script>\n";
2121

2222
if (OutputTableSorterJsCss) {
2323
out << "<link rel='stylesheet' href='/jquery.tablesorter.css'>\n";

library/cpp/monlib/service/pages/index_mon_page.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ TIndexMonPage* TIndexMonPage::FindIndexPage(const TString& relativePath) {
136136
}
137137

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

144144
void TIndexMonPage::OutputHead(IOutputStream& out) {

library/cpp/monlib/service/pages/mon_page.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@ namespace NMonitoring {
2020
static const char HTTPNOTFOUND[] = "HTTP/1.1 404 Invalid URI\r\nConnection: Close\r\n\r\nInvalid URL\r\n";
2121
static const char HTTPUNAUTHORIZED[] = "HTTP/1.1 401 Unauthorized\r\nConnection: Close\r\n\r\nUnauthorized\r\n";
2222
static const char HTTPFORBIDDEN[] = "HTTP/1.1 403 Forbidden\r\nConnection: Close\r\n\r\nForbidden\r\n";
23+
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";
24+
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";
2325

2426
// Fonts
2527
static const char HTTPOKFONTEOT[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/vnd.ms-fontobject\r\nConnection: Close\r\n\r\n";
2628
static const char HTTPOKFONTTTF[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/x-font-ttf\r\nConnection: Close\r\n\r\n";
2729
static const char HTTPOKFONTWOFF[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff\r\nConnection: Close\r\n\r\n";
2830
static const char HTTPOKFONTWOFF2[] = "HTTP/1.1 200 Ok\r\nContent-Type: application/font-woff2\r\nConnection: Close\r\n\r\n";
31+
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";
32+
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";
33+
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";
34+
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";
2935

3036
// Images
3137
static const char HTTPOKPNG[] = "HTTP/1.1 200 Ok\r\nContent-Type: image/png\r\nConnection: Close\r\n\r\n";

library/cpp/monlib/service/pages/resource_mon_page.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ void TResourceMonPage::Output(NMonitoring::IMonHttpRequest& request) {
1212
out << HTTPOKJSON;
1313
break;
1414
case CSS:
15-
out << HTTPOKCSS;
15+
out << (IsCached ? HTTPOKCSS_CACHED : HTTPOKCSS);
1616
break;
1717
case JAVASCRIPT:
18-
out << HTTPOKJAVASCRIPT;
18+
out << (IsCached ? HTTPOKJAVASCRIPT_CACHED : HTTPOKJAVASCRIPT);
1919
break;
2020
case FONT_EOT:
21-
out << HTTPOKFONTEOT;
21+
out << (IsCached ? HTTPOKFONTEOT_CACHED : HTTPOKFONTEOT);
2222
break;
2323
case FONT_TTF:
24-
out << HTTPOKFONTTTF;
24+
out << (IsCached ? HTTPOKFONTTTF_CACHED : HTTPOKFONTTTF);
2525
break;
2626
case FONT_WOFF:
27-
out << HTTPOKFONTWOFF;
27+
out << (IsCached ? HTTPOKFONTWOFF_CACHED : HTTPOKFONTWOFF);
2828
break;
2929
case FONT_WOFF2:
30-
out << HTTPOKFONTWOFF2;
30+
out << (IsCached ? HTTPOKFONTWOFF2_CACHED : HTTPOKFONTWOFF2);
3131
break;
3232
case PNG:
3333
out << HTTPOKPNG;

library/cpp/monlib/service/pages/resource_mon_page.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ namespace NMonitoring {
2424
};
2525

2626
TResourceMonPage(const TString& path, const TString& resourceName,
27-
const EResourceType& resourceType = BINARY)
27+
const EResourceType& resourceType = BINARY, const bool isCached = false)
2828
: IMonPage(path, "")
2929
, ResourceName(resourceName)
3030
, ResourceType(resourceType)
31+
, IsCached(isCached)
3132
{
3233
}
3334

@@ -38,6 +39,7 @@ namespace NMonitoring {
3839
private:
3940
TString ResourceName;
4041
EResourceType ResourceType;
42+
bool IsCached;
4143
};
4244

4345
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
# This file was generated by the build system used internally in the Yandex monorepo.
3+
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
4+
# like target_include_directories). These modifications will be ported to original
5+
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
6+
# original buildsystem will not be accepted.
7+
8+
9+
get_built_tool_path(
10+
TOOL_rescompiler_bin
11+
TOOL_rescompiler_dependency
12+
tools/rescompiler/bin
13+
rescompiler
14+
)
15+
16+
add_library(service-pages-resources INTERFACE)
17+
target_link_libraries(service-pages-resources INTERFACE
18+
contrib-libs-cxxsupp
19+
yutil
20+
library-cpp-resource
21+
cpp-monlib-dynamic_counters
22+
)
23+
24+
add_global_library_for(service-pages-resources.global service-pages-resources)
25+
target_link_libraries(service-pages-resources.global PUBLIC
26+
contrib-libs-cxxsupp
27+
yutil
28+
library-cpp-resource
29+
cpp-monlib-dynamic_counters
30+
)
31+
target_sources(service-pages-resources.global PRIVATE
32+
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
33+
)
34+
resources(service-pages-resources.global
35+
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
36+
INPUTS
37+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/css/bootstrap.min.css
38+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.eot
39+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.svg
40+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.ttf
41+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.woff
42+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/bootstrap.min.js
43+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/jquery.min.js
44+
KEYS
45+
static/css/bootstrap.min.css
46+
static/fonts/glyphicons-halflings-regular.eot
47+
static/fonts/glyphicons-halflings-regular.svg
48+
static/fonts/glyphicons-halflings-regular.ttf
49+
static/fonts/glyphicons-halflings-regular.woff
50+
static/js/bootstrap.min.js
51+
static/js/jquery.min.js
52+
)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
# This file was generated by the build system used internally in the Yandex monorepo.
3+
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
4+
# like target_include_directories). These modifications will be ported to original
5+
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
6+
# original buildsystem will not be accepted.
7+
8+
9+
get_built_tool_path(
10+
TOOL_rescompiler_bin
11+
TOOL_rescompiler_dependency
12+
tools/rescompiler/bin
13+
rescompiler
14+
)
15+
16+
add_library(service-pages-resources INTERFACE)
17+
target_link_libraries(service-pages-resources INTERFACE
18+
contrib-libs-linux-headers
19+
contrib-libs-cxxsupp
20+
yutil
21+
library-cpp-resource
22+
cpp-monlib-dynamic_counters
23+
)
24+
25+
add_global_library_for(service-pages-resources.global service-pages-resources)
26+
target_link_libraries(service-pages-resources.global PUBLIC
27+
contrib-libs-linux-headers
28+
contrib-libs-cxxsupp
29+
yutil
30+
library-cpp-resource
31+
cpp-monlib-dynamic_counters
32+
)
33+
target_sources(service-pages-resources.global PRIVATE
34+
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
35+
)
36+
resources(service-pages-resources.global
37+
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
38+
INPUTS
39+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/css/bootstrap.min.css
40+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.eot
41+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.svg
42+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.ttf
43+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.woff
44+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/bootstrap.min.js
45+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/jquery.min.js
46+
KEYS
47+
static/css/bootstrap.min.css
48+
static/fonts/glyphicons-halflings-regular.eot
49+
static/fonts/glyphicons-halflings-regular.svg
50+
static/fonts/glyphicons-halflings-regular.ttf
51+
static/fonts/glyphicons-halflings-regular.woff
52+
static/js/bootstrap.min.js
53+
static/js/jquery.min.js
54+
)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
# This file was generated by the build system used internally in the Yandex monorepo.
3+
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
4+
# like target_include_directories). These modifications will be ported to original
5+
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
6+
# original buildsystem will not be accepted.
7+
8+
9+
get_built_tool_path(
10+
TOOL_rescompiler_bin
11+
TOOL_rescompiler_dependency
12+
tools/rescompiler/bin
13+
rescompiler
14+
)
15+
16+
add_library(service-pages-resources INTERFACE)
17+
target_link_libraries(service-pages-resources INTERFACE
18+
contrib-libs-linux-headers
19+
contrib-libs-cxxsupp
20+
yutil
21+
library-cpp-resource
22+
cpp-monlib-dynamic_counters
23+
)
24+
25+
add_global_library_for(service-pages-resources.global service-pages-resources)
26+
target_link_libraries(service-pages-resources.global PUBLIC
27+
contrib-libs-linux-headers
28+
contrib-libs-cxxsupp
29+
yutil
30+
library-cpp-resource
31+
cpp-monlib-dynamic_counters
32+
)
33+
target_sources(service-pages-resources.global PRIVATE
34+
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
35+
)
36+
resources(service-pages-resources.global
37+
${CMAKE_BINARY_DIR}/library/cpp/monlib/service/pages/resources/ff1cb2429e1fce561e9b0ed0d5522c37.cpp
38+
INPUTS
39+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/css/bootstrap.min.css
40+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.eot
41+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.svg
42+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.ttf
43+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/fonts/glyphicons-halflings-regular.woff
44+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/bootstrap.min.js
45+
${CMAKE_SOURCE_DIR}/library/cpp/monlib/service/pages/resources/static/js/jquery.min.js
46+
KEYS
47+
static/css/bootstrap.min.css
48+
static/fonts/glyphicons-halflings-regular.eot
49+
static/fonts/glyphicons-halflings-regular.svg
50+
static/fonts/glyphicons-halflings-regular.ttf
51+
static/fonts/glyphicons-halflings-regular.woff
52+
static/js/bootstrap.min.js
53+
static/js/jquery.min.js
54+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# This file was generated by the build system used internally in the Yandex monorepo.
3+
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
4+
# like target_include_directories). These modifications will be ported to original
5+
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
6+
# original buildsystem will not be accepted.
7+
8+
9+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA)
10+
include(CMakeLists.linux-aarch64.txt)
11+
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
12+
include(CMakeLists.darwin-x86_64.txt)
13+
elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA)
14+
include(CMakeLists.windows-x86_64.txt)
15+
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
16+
include(CMakeLists.linux-x86_64.txt)
17+
endif()

0 commit comments

Comments
 (0)