Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
3b3ed84b
Commit
3b3ed84b
authored
Jul 03, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReplicateStorage: drop attachment signature when resolved a document deletion conflict
parent
acb3274d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
692 additions
and
3 deletions
+692
-3
src/jio.storage/replicatestorage.js
src/jio.storage/replicatestorage.js
+18
-3
test/jio.storage/replicatestorage_repairattachment.tests.js
test/jio.storage/replicatestorage_repairattachment.tests.js
+674
-0
No files found.
src/jio.storage/replicatestorage.js
View file @
3b3ed84b
...
@@ -716,6 +716,13 @@
...
@@ -716,6 +716,13 @@
});
});
}
else
{
}
else
{
result
result
.
push
(
function
()
{
// Drop signature if the destination document was empty
// but a signature exists
if
(
options
.
create_new_document
===
true
)
{
return
context
.
_signature_sub_storage
.
remove
(
id
);
}
})
.
push
(
function
()
{
.
push
(
function
()
{
return
destination
.
put
(
id
,
doc
);
return
destination
.
put
(
id
,
doc
);
})
})
...
@@ -829,7 +836,11 @@
...
@@ -829,7 +836,11 @@
return
propagateModification
(
context
,
source
,
destination
,
doc
,
return
propagateModification
(
context
,
source
,
destination
,
doc
,
local_hash
,
id
,
skip_document_dict
,
local_hash
,
id
,
skip_document_dict
,
{
use_post
:
((
options
.
use_post
)
&&
{
use_post
:
((
options
.
use_post
)
&&
(
remote_hash
===
null
))});
(
remote_hash
===
null
)),
create_new_document
:
((
remote_hash
===
null
)
&&
(
status_hash
!==
null
))
});
}
}
// Conflict cases
// Conflict cases
...
@@ -852,7 +863,9 @@
...
@@ -852,7 +863,9 @@
id
,
id
,
skip_document_dict
,
skip_document_dict
,
{
use_post
:
((
options
.
use_revert_post
)
&&
{
use_post
:
((
options
.
use_revert_post
)
&&
(
local_hash
===
null
))}
(
local_hash
===
null
)),
create_new_document
:
((
local_hash
===
null
)
&&
(
status_hash
!==
null
))}
);
);
}
}
...
@@ -861,7 +874,9 @@
...
@@ -861,7 +874,9 @@
// Copy remote modification remotely
// Copy remote modification remotely
return
propagateModification
(
context
,
source
,
destination
,
doc
,
return
propagateModification
(
context
,
source
,
destination
,
doc
,
local_hash
,
id
,
skip_document_dict
,
local_hash
,
id
,
skip_document_dict
,
{
use_post
:
options
.
use_post
});
{
use_post
:
options
.
use_post
,
create_new_document
:
(
status_hash
!==
null
)});
}
}
doc
=
doc
||
local_hash
;
doc
=
doc
||
local_hash
;
remote_doc
=
remote_doc
||
remote_hash
;
remote_doc
=
remote_doc
||
remote_hash
;
...
...
test/jio.storage/replicatestorage_repairattachment.tests.js
View file @
3b3ed84b
This diff is collapsed.
Click to expand it.
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