aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgvit <gvit@ydb.tech>2022-08-29 13:54:13 +0300
committergvit <gvit@ydb.tech>2022-08-29 13:54:13 +0300
commit9b0d1ea270d13770e543a5af344a4856780d5d7f (patch)
treefe589368c8ae4a9eee5ee8ccc03055661b9c7c7d
parentb2ba409b36372429612d84a1d66a459666dabf6d (diff)
downloadydb-9b0d1ea270d13770e543a5af344a4856780d5d7f.tar.gz
add trailing info in session actor
-rw-r--r--contrib/restricted/boost/date_time/include/boost/date_time/gregorian/gregorian_io.hpp6
-rw-r--r--contrib/restricted/boost/date_time/include/boost/date_time/posix_time/posix_time_io.hpp41
-rw-r--r--ydb/core/kqp/kqp_session_actor.cpp12
3 files changed, 11 insertions, 48 deletions
diff --git a/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/gregorian_io.hpp b/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/gregorian_io.hpp
index 71e0c0a5b8..49e5d41ed8 100644
--- a/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/gregorian_io.hpp
+++ b/contrib/restricted/boost/date_time/include/boost/date_time/gregorian/gregorian_io.hpp
@@ -21,10 +21,6 @@
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/gregorian/conversion.hpp> // to_tm will be needed in the facets
-#include <util/system/compiler.h>
-Y_PRAGMA_DIAGNOSTIC_PUSH
-Y_PRAGMA_NO_WSHADOW
-
namespace boost {
namespace gregorian {
@@ -785,6 +781,4 @@ namespace gregorian {
} } // namespaces
-Y_PRAGMA_DIAGNOSTIC_POP
-
#endif // DATE_TIME_GREGORIAN_IO_HPP__
diff --git a/contrib/restricted/boost/date_time/include/boost/date_time/posix_time/posix_time_io.hpp b/contrib/restricted/boost/date_time/include/boost/date_time/posix_time/posix_time_io.hpp
index 2fb8a4232b..6a72e32785 100644
--- a/contrib/restricted/boost/date_time/include/boost/date_time/posix_time/posix_time_io.hpp
+++ b/contrib/restricted/boost/date_time/include/boost/date_time/posix_time/posix_time_io.hpp
@@ -20,8 +20,6 @@
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/date_time/posix_time/conversion.hpp> // to_tm will be needed in the facets
-#include <util/system/compiler.h>
-
namespace boost {
namespace posix_time {
@@ -73,23 +71,10 @@ namespace posix_time {
operator>>(std::basic_istream<CharT, Traits>& is, ptime& pt)
{
boost::io::ios_flags_saver iflags(is);
-
- Y_PRAGMA_DIAGNOSTIC_PUSH
- Y_PRAGMA_NO_WSHADOW
-
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
-
- Y_PRAGMA_DIAGNOSTIC_POP
-
if (strm_sentry) {
try {
- Y_PRAGMA_DIAGNOSTIC_PUSH
- Y_PRAGMA_NO_WSHADOW
-
typedef typename date_time::time_input_facet<ptime, CharT> time_input_facet_local;
-
- Y_PRAGMA_DIAGNOSTIC_POP
-
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
if(std::has_facet<time_input_facet_local>(is.getloc())) {
std::use_facet<time_input_facet_local>(is.getloc()).get(sit, str_end, is, pt);
@@ -153,23 +138,10 @@ namespace posix_time {
operator>>(std::basic_istream<CharT, Traits>& is, time_period& tp)
{
boost::io::ios_flags_saver iflags(is);
-
- Y_PRAGMA_DIAGNOSTIC_PUSH
- Y_PRAGMA_NO_WSHADOW
-
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
-
- Y_PRAGMA_DIAGNOSTIC_POP
-
if (strm_sentry) {
try {
- Y_PRAGMA_DIAGNOSTIC_PUSH
- Y_PRAGMA_NO_WSHADOW
-
typedef typename date_time::time_input_facet<ptime, CharT> time_input_facet_local;
-
- Y_PRAGMA_DIAGNOSTIC_POP
-
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
if(std::has_facet<time_input_facet_local>(is.getloc())) {
std::use_facet<time_input_facet_local>(is.getloc()).get(sit, str_end, is, tp);
@@ -230,23 +202,10 @@ namespace posix_time {
operator>>(std::basic_istream<CharT, Traits>& is, time_duration& td)
{
boost::io::ios_flags_saver iflags(is);
-
- Y_PRAGMA_DIAGNOSTIC_PUSH
- Y_PRAGMA_NO_WSHADOW
-
typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
-
- Y_PRAGMA_DIAGNOSTIC_POP
-
if (strm_sentry) {
try {
- Y_PRAGMA_DIAGNOSTIC_PUSH
- Y_PRAGMA_NO_WSHADOW
-
typedef typename date_time::time_input_facet<ptime, CharT> time_input_facet_local;
-
- Y_PRAGMA_DIAGNOSTIC_POP
-
std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
if(std::has_facet<time_input_facet_local>(is.getloc())) {
std::use_facet<time_input_facet_local>(is.getloc()).get(sit, str_end, is, td);
diff --git a/ydb/core/kqp/kqp_session_actor.cpp b/ydb/core/kqp/kqp_session_actor.cpp
index cfb8f81be3..e537d6dcc0 100644
--- a/ydb/core/kqp/kqp_session_actor.cpp
+++ b/ydb/core/kqp/kqp_session_actor.cpp
@@ -1273,6 +1273,14 @@ public:
}
}
+ template<class TEvRecord>
+ void AddTrailingInfo(TEvRecord& record) {
+ if (ShutdownState) {
+ LOG_D("Session [" << SessionId << "] is closing, set trailing metadata to request session shutdown");
+ record.SetWorkerIsClosing(true);
+ }
+ }
+
void FillTxInfo(NKikimrKqp::TQueryResponse* response) {
YQL_ENSURE(QueryState);
if (QueryState->Commit) {
@@ -1458,7 +1466,7 @@ public:
auto response = TEvKqp::TEvProcessResponse::Error(ydbStatus, message);
- //AddTrailingInfo(response->Record);
+ AddTrailingInfo(response->Record);
Send(sender, response.Release(), 0, proxyRequestId);
}
@@ -1496,6 +1504,8 @@ public:
auto& response = *record.MutableResponse();
const auto& status = record.GetYdbStatus();
+ AddTrailingInfo(record);
+
if (QueryState->KeepSession) {
response.SetSessionId(SessionId);
}