Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Harbor 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
dCache
cta
Commits
22685812
Commit
22685812
authored
7 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
SqliteCatalogue::filesWrittenToTape() no longer uses deferred transactions
parent
2a3da424
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
catalogue/SqliteCatalogue.cpp
+2
-4
2 additions, 4 deletions
catalogue/SqliteCatalogue.cpp
with
2 additions
and
4 deletions
catalogue/SqliteCatalogue.cpp
+
2
−
4
View file @
22685812
...
...
@@ -234,7 +234,6 @@ void SqliteCatalogue::filesWrittenToTape(const std::set<TapeFileWritten> &events
std
::
lock_guard
<
std
::
mutex
>
m_lock
(
m_mutex
);
auto
conn
=
m_connPool
.
getConn
();
rdbms
::
AutoRollback
autoRollback
(
conn
);
const
auto
tape
=
selectTape
(
conn
,
firstEvent
.
vid
);
uint64_t
expectedFSeq
=
tape
.
lastFSeq
+
1
;
...
...
@@ -261,13 +260,12 @@ void SqliteCatalogue::filesWrittenToTape(const std::set<TapeFileWritten> &events
auto
lastEventItor
=
events
.
cend
();
lastEventItor
--
;
const
TapeFileWritten
&
lastEvent
=
*
lastEventItor
;
updateTape
(
conn
,
rdbms
::
Stmt
::
AutocommitMode
::
O
FF
,
lastEvent
.
vid
,
lastEvent
.
fSeq
,
totalCompressedBytesWritten
,
updateTape
(
conn
,
rdbms
::
Stmt
::
AutocommitMode
::
O
N
,
lastEvent
.
vid
,
lastEvent
.
fSeq
,
totalCompressedBytesWritten
,
lastEvent
.
tapeDrive
);
for
(
const
auto
&
event
:
events
)
{
fileWrittenToTape
(
rdbms
::
Stmt
::
AutocommitMode
::
O
FF
,
conn
,
event
);
fileWrittenToTape
(
rdbms
::
Stmt
::
AutocommitMode
::
O
N
,
conn
,
event
);
}
conn
.
commit
();
}
catch
(
exception
::
Exception
&
ex
)
{
throw
exception
::
Exception
(
std
::
string
(
__FUNCTION__
)
+
" failed: "
+
ex
.
getMessage
().
str
());
}
...
...
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