Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
b109c272
Commit
b109c272
authored
Oct 02, 2015
by
Giorgos Korfiatis
Browse files
fix deadlock with get_dir_contents
parent
f10c0b1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
agkyra/syncer/localfs_client.py
View file @
b109c272
...
...
@@ -695,6 +695,7 @@ class LocalfsFileClient(FileClient):
return
LocalfsTargetHandle
(
self
,
target_state
)
def
get_dir_contents
(
self
,
objname
):
logger
.
debug
(
"Getting contents for object '%s'"
%
objname
)
with
TransactedConnection
(
self
.
syncer_dbtuple
)
as
db
:
return
db
.
get_dir_contents
(
self
.
SIGNATURE
,
objname
)
...
...
@@ -708,10 +709,10 @@ class LocalfsFileClient(FileClient):
return
rel_path
=
os
.
path
.
relpath
(
path
,
start
=
self
.
ROOTPATH
)
objname
=
utils
.
to_standard_sep
(
rel_path
)
leaves
=
self
.
get_dir_contents
(
objname
)
if
rec
else
None
with
self
.
probe_candidates
.
lock
()
as
d
:
d
[
objname
]
=
self
.
none_info
()
if
rec
:
leaves
=
self
.
get_dir_contents
(
objname
)
for
leaf
in
leaves
:
d
[
leaf
]
=
self
.
none_info
()
...
...
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