Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
jio
Commits
89f6bb0c
Commit
89f6bb0c
authored
Dec 18, 2014
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle concurrent deletion while fetching all documents
parent
1e80b30f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
src/jio.storage/querystorage.js
src/jio.storage/querystorage.js
+13
-3
No files found.
src/jio.storage/querystorage.js
View file @
89f6bb0c
...
...
@@ -101,12 +101,22 @@
var
include_query_list
=
[
result
],
len
,
i
;
function
safeGet
(
j
)
{
return
substorage
.
get
({
"
_id
"
:
result
[
j
].
id
})
.
push
(
undefined
,
function
(
error
)
{
// Document may have been dropped after listing
if
((
error
instanceof
jIO
.
util
.
jIOError
)
&&
(
error
.
status_code
===
404
))
{
return
;
}
throw
error
;
});
}
if
(
is_manual_include_needed
)
{
len
=
result
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
include_query_list
.
push
(
substorage
.
get
({
"
_id
"
:
result
[
i
].
id
})
);
include_query_list
.
push
(
safeGet
(
i
));
}
result
=
RSVP
.
all
(
include_query_list
);
}
...
...
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