Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
0935a6f9
Commit
0935a6f9
authored
5 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
no-jira: fix concurrent issue in VFS migration
parent
74c9c259
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
src/main/java/org/olat/core/commons/services/vfs/manager/VFSRepositoryServiceImpl.java
+2
-2
2 additions, 2 deletions
...ommons/services/vfs/manager/VFSRepositoryServiceImpl.java
with
2 additions
and
2 deletions
src/main/java/org/olat/core/commons/services/vfs/manager/VFSRepositoryServiceImpl.java
+
2
−
2
View file @
0935a6f9
...
@@ -1087,18 +1087,18 @@ public class VFSRepositoryServiceImpl implements VFSRepositoryService, GenericEv
...
@@ -1087,18 +1087,18 @@ public class VFSRepositoryServiceImpl implements VFSRepositoryService, GenericEv
if
(
directory
.
isHidden
()
||
VFSRepositoryModule
.
canMeta
(
directory
)
!=
VFSConstants
.
YES
)
{
if
(
directory
.
isHidden
()
||
VFSRepositoryModule
.
canMeta
(
directory
)
!=
VFSConstants
.
YES
)
{
return
FileVisitResult
.
SKIP_SUBTREE
;
return
FileVisitResult
.
SKIP_SUBTREE
;
}
}
if
(
dir
.
getNameCount
()
>
50
)
{
if
(
dir
.
getNameCount
()
>
50
||
parentLine
.
size
()
>
50
)
{
log
.
error
(
"More than 50 directories deep. Stop migrating metadata: {}"
,
directory
);
log
.
error
(
"More than 50 directories deep. Stop migrating metadata: {}"
,
directory
);
return
FileVisitResult
.
SKIP_SUBTREE
;
return
FileVisitResult
.
SKIP_SUBTREE
;
}
}
VFSMetadata
parent
=
parentLine
.
peekLast
();
VFSMetadata
parent
=
parentLine
.
peekLast
();
VFSMetadata
metadata
=
migrateMetadata
(
dir
.
toFile
(),
parent
);
VFSMetadata
metadata
=
migrateMetadata
(
dir
.
toFile
(),
parent
);
parentLine
.
add
(
metadata
);
if
(
metadata
!=
null
&&
"migrated"
.
equals
(
metadata
.
getMigrated
()))
{
if
(
metadata
!=
null
&&
"migrated"
.
equals
(
metadata
.
getMigrated
()))
{
dbInstance
.
commitAndCloseSession
();
dbInstance
.
commitAndCloseSession
();
return
FileVisitResult
.
SKIP_SUBTREE
;
return
FileVisitResult
.
SKIP_SUBTREE
;
}
}
parentLine
.
add
(
metadata
);
dbInstance
.
commit
();
dbInstance
.
commit
();
return
FileVisitResult
.
CONTINUE
;
return
FileVisitResult
.
CONTINUE
;
}
}
...
...
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