Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
94fc9d38
Unverified
Commit
94fc9d38
authored
Jan 29, 2024
by
Axel Kingsley
Committed by
GitHub
Jan 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TxMgr: Rearrange TxMgr closure in Batcher (#9205)
parent
8d0af85c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
service.go
op-batcher/batcher/service.go
+6
-3
No files found.
op-batcher/batcher/service.go
View file @
94fc9d38
...
...
@@ -329,6 +329,12 @@ func (bs *BatcherService) Stop(ctx context.Context) error {
}
bs
.
Log
.
Info
(
"Stopping batcher"
)
// close the TxManager first, so that new work is denied, in-flight work is cancelled as early as possible
// (transactions which are expected to be confirmed are still waited for)
if
bs
.
TxManager
!=
nil
{
bs
.
TxManager
.
Close
()
}
var
result
error
if
bs
.
driver
!=
nil
{
if
err
:=
bs
.
driver
.
StopBatchSubmittingIfRunning
(
ctx
);
err
!=
nil
{
...
...
@@ -352,9 +358,6 @@ func (bs *BatcherService) Stop(ctx context.Context) error {
result
=
errors
.
Join
(
result
,
fmt
.
Errorf
(
"failed to close balance metricer: %w"
,
err
))
}
}
if
bs
.
TxManager
!=
nil
{
bs
.
TxManager
.
Close
()
}
if
bs
.
metricsSrv
!=
nil
{
if
err
:=
bs
.
metricsSrv
.
Stop
(
ctx
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment