Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tabacco
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai3
tools
tabacco
Commits
3cf73522
Commit
3cf73522
authored
Oct 10, 2020
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close the sql.Statement that is bound to the transaction
parent
37e53d87
Pipeline
#8007
passed with stages
in 1 minute and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
metadb/server/service.go
metadb/server/service.go
+5
-2
No files found.
metadb/server/service.go
View file @
3cf73522
...
...
@@ -178,7 +178,8 @@ func (s *Service) AddDataset(ctx context.Context, backup tabacco.Backup, ds taba
return
retryBusy
(
ctx
,
func
()
error
{
return
withTX
(
ctx
,
s
.
db
,
func
(
tx
*
sql
.
Tx
)
error
{
for
_
,
dbAtom
:=
range
makeAtoms
(
backup
,
ds
)
{
if
_
,
err
:=
s
.
stmts
.
get
(
tx
,
"insert_atom"
)
.
Exec
(
stmt
:=
s
.
stmts
.
get
(
tx
,
"insert_atom"
)
_
,
err
:=
stmt
.
Exec
(
dbAtom
.
BackupID
,
dbAtom
.
BackupTimestamp
,
dbAtom
.
BackupHost
,
...
...
@@ -188,7 +189,9 @@ func (s *Service) AddDataset(ctx context.Context, backup tabacco.Backup, ds taba
dbAtom
.
AtomName
,
dbAtom
.
AtomPath
,
dbAtom
.
AtomFullPath
,
);
err
!=
nil
{
)
stmt
.
Close
()
if
err
!=
nil
{
return
err
}
}
...
...
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