Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
a5b996d5
Commit
a5b996d5
authored
12 years ago
by
jakubs
Browse files
Options
Downloads
Patches
Plain Diff
BIS-376 SP-574 Add error during prepare phase should also trigger rollback_pre_registration
SVN: 28666
parent
6b499389
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/v2/DataSetStorageAlgorithm.java
+20
-5
20 additions, 5 deletions
...isd/etlserver/registrator/v2/DataSetStorageAlgorithm.java
with
20 additions
and
5 deletions
datastore_server/source/java/ch/systemsx/cisd/etlserver/registrator/v2/DataSetStorageAlgorithm.java
+
20
−
5
View file @
a5b996d5
...
@@ -304,6 +304,12 @@ public class DataSetStorageAlgorithm<T extends DataSetInformation>
...
@@ -304,6 +304,12 @@ public class DataSetStorageAlgorithm<T extends DataSetInformation>
*/
*/
public
void
transitionToRolledbackState
(
Throwable
throwable
)
public
void
transitionToRolledbackState
(
Throwable
throwable
)
{
{
// Rollback in initialized state means that preparation has failed.
if
(
state
instanceof
InitializedState
)
{
return
;
}
// Rollback may be called on in the precommit state or in the prepared state.
// Rollback may be called on in the precommit state or in the prepared state.
if
(
state
instanceof
PreparedState
)
if
(
state
instanceof
PreparedState
)
{
{
...
@@ -328,8 +334,14 @@ public class DataSetStorageAlgorithm<T extends DataSetInformation>
...
@@ -328,8 +334,14 @@ public class DataSetStorageAlgorithm<T extends DataSetInformation>
public
void
transitionToUndoneState
()
public
void
transitionToUndoneState
()
{
{
// Rollback may be called on in the stored state or in the prepared state. In the prepared
// Rollback may be called on in the stored state or in the prepared/initialized state. In
// state, there is nothing to do.
// the prepared state, there is nothing to do.
if
(
state
instanceof
InitializedState
)
{
state
=
new
PreparedState
<
T
>((
InitializedState
<
T
>)
state
);
}
if
(
state
instanceof
PreparedState
)
if
(
state
instanceof
PreparedState
)
{
{
state
=
new
UndoneState
<
T
>((
PreparedState
<
T
>)
state
);
state
=
new
UndoneState
<
T
>((
PreparedState
<
T
>)
state
);
...
@@ -690,10 +702,13 @@ public class DataSetStorageAlgorithm<T extends DataSetInformation>
...
@@ -690,10 +702,13 @@ public class DataSetStorageAlgorithm<T extends DataSetInformation>
*/
*/
private
void
cleanUpMarkerFile
()
private
void
cleanUpMarkerFile
()
{
{
getFileOperations
().
delete
(
markerFile
);
if
(
markerFile
!=
null
&&
markerFile
.
exists
())
if
(
markerFile
.
exists
())
{
{
operationLog
.
error
(
"Marker file '"
+
markerFile
+
"' could not be deleted."
);
getFileOperations
().
delete
(
markerFile
);
if
(
markerFile
.
exists
())
{
operationLog
.
error
(
"Marker file '"
+
markerFile
+
"' could not be deleted."
);
}
}
}
}
}
}
}
...
...
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