Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fts3
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
Louis Regnier
fts3
Commits
0b4d1559
Commit
0b4d1559
authored
5 months ago
by
Mihai Patrascoiu
Committed by
Louis Regnier
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Disable all "INSERT" and "UPDATE" operations from the OptimizerService
parent
111bcb6e
No related branches found
No related tags found
No related merge requests found
Pipeline
#8066729
passed with stages
in 5 minutes and 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/db/mysql/Optimizer.cpp
+6
-0
6 additions, 0 deletions
src/db/mysql/Optimizer.cpp
src/optimizer/services/OptimizerCallbacks.h
+4
-0
4 additions, 0 deletions
src/optimizer/services/OptimizerCallbacks.h
with
10 additions
and
0 deletions
src/db/mysql/Optimizer.cpp
+
6
−
0
View file @
0b4d1559
...
...
@@ -558,6 +558,9 @@ double MySqlAPI::getThroughputAsDestination(const std::string &se)
void
MySqlAPI
::
storeOptimizerDecision
(
const
Pair
&
pair
,
int
activeDecision
,
const
PairState
&
newState
,
int
diff
,
const
std
::
string
&
rationale
)
{
FTS3_COMMON_LOGGER_NEWLOG
(
INFO
)
<<
"OptimizerDataSource->storeOptimizerDecision(..) stub"
<<
commit
;
return
;
try
{
soci
::
session
sql
(
*
connectionPool
);
setNewOptimizerValue
(
sql
,
pair
,
activeDecision
,
newState
.
ema
);
...
...
@@ -573,6 +576,9 @@ void MySqlAPI::storeOptimizerDecision(const Pair &pair, int activeDecision, cons
void
MySqlAPI
::
storeOptimizerStreams
(
const
Pair
&
pair
,
int
streams
)
{
FTS3_COMMON_LOGGER_NEWLOG
(
INFO
)
<<
"OptimizerDataSource->storeOptimizerStreams(..) stub"
<<
commit
;
return
;
soci
::
session
sql
(
*
connectionPool
);
try
{
const
std
::
string
utc_timestamp
=
sql
.
get_backend_name
()
==
"mysql"
?
"UTC_TIMESTAMP()"
:
"NOW() AT TIME ZONE 'UTC'"
;
...
...
This diff is collapsed.
Click to expand it.
src/optimizer/services/OptimizerCallbacks.h
+
4
−
0
View file @
0b4d1559
...
...
@@ -18,6 +18,7 @@
#include
<string>
#include
"common/Logger.h"
#include
<db/generic/Pair.h>
#include
<monitoring/msg-ifce.h>
...
...
@@ -43,6 +44,9 @@ public:
void
notifyDecision
(
const
Pair
&
pair
,
int
decision
,
const
PairState
&
current
,
int
diff
,
const
std
::
string
&
rationale
)
{
FTS3_COMMON_LOGGER_NEWLOG
(
INFO
)
<<
"OptimizerNotifier->storeOptimizerDecision(..) stub"
<<
fts3
::
common
::
commit
;
return
;
// Broadcast the decision
OptimizerInfo
msg
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment