Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
haf
Merge requests
!257
query_supervisor configuration and parallel queries support and functionl test refactoring
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
query_supervisor configuration and parallel queries support and functionl test refactoring
mi_sql_breaker_tuples_limit_config
into
develop
Overview
2
Commits
9
Pipelines
12
Changes
23
Merged
Marcin
requested to merge
mi_sql_breaker_tuples_limit_config
into
develop
2 years ago
Overview
2
Commits
9
Pipelines
12
Changes
23
Expand
0
0
Merge request reports
Viewing commit
86eefba7
Prev
Next
Show latest version
23 files
+
502
−
43
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
23
Search (e.g. *.vue) (Ctrl+P)
86eefba7
queries_supervisor: tuples limit and timout in configuration
· 86eefba7
Marcin
authored
2 years ago
src/query_supervisor/endpoints/initialization.cpp
+
3
−
14
Options
#include
"psql_utils/postgres_includes.hpp"
#include
"configuration.hpp"
#include
"postgres_accessor.hpp"
#include
"query_handlers.hpp"
#include
"psql_utils/backend.h"
#include
"psql_utils/custom_configuration.h"
#include
"psql_utils/spi_session.hpp"
#include
<boost/algorithm/string.hpp>
#include
<boost/scope_exit.hpp>
#include
<chrono>
@@ -19,17 +17,8 @@ extern "C" {
bool
isCurrentUserLimited
()
{
using
PsqlTools
::
QuerySupervisor
::
PostgresAccessor
;
const
auto
limitedUsersString
=
PostgresAccessor
::
getInstance
()
.
getCustomConfiguration
().
getOptionAsString
(
"limited_users"
);
LOG_DEBUG
(
"Limited users: {%s}"
,
limitedUsersString
.
c_str
()
);
if
(
limitedUsersString
.
empty
()
)
{
return
false
;
}
std
::
vector
<
std
::
string
>
users
;
boost
::
split
(
users
,
limitedUsersString
,
boost
::
is_any_of
(
","
)
);
const
auto
users
=
PostgresAccessor
::
getInstance
()
.
getConfiguration
().
getBlockedUsers
();
auto
userIt
=
std
::
find
(
users
.
begin
(),
users
.
end
(),
PostgresAccessor
::
getInstance
().
getBackend
().
userName
()
);
return
userIt
!=
users
.
end
();
Loading