On Wednesday, October 29, 2014 1:40:04 PM UTC-4, Jens Alfke wrote:
>
>
> Aw crap, you're right — it's a mistake in my sample code. The line
>                 CBLUnsavedRevision *newRev = [*current* createRevision];
> should be
>                 CBLUnsavedRevision *newRev = [*rev* createRevision];
> which I think is the same change you made in the code you just posted.
>
> I'll go fix the docs again. Thank you so much for noticing & debugging 
> this.
>
> —Jens
>

Posting again. I think Google Groups didn't like including SQL in my 
comment. 

- - - - - - - - -

Yes, they are effectively the same. However, the conflicts still remain. 

Here's the output from my latest run. What's odd is that newly created 
revisions do not have revision IDs even after being saved. 

13 total Conflicts for: f8ee7974-9558-4ba4-ba94-6a7ce98c58b4
Saved current of new revision (null) for revsion 
121-0c51102053b54432ea48dad131c5cf86 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
120-c438665ca9877ee388d91fbb71f3d33f of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
119-36bd4f3d615121925ea10e464dff9e84 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
116-b9df055884bcd38a28d4db14582c608a of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
106-06ab0852a09ffd7a74a8679ae9e6d2c6 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
110-5502833a249b6ce4f7ca6e2ea2b40cb7 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
107-0aec4a3c4f6b41af463d052776f70c23 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
118-a8bee8abf22403a04703d29dc8e84325 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
115-4643765c558bddde1eddb0ebd71039c5 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
113-3eb619c463767d3449652dc553c196a9 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
114-b119801ccce39c63560dd7a3576a38ea of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
112-edd492acdcaef62e8fbe83f8c7b7fedd of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Saved non-current of new revision (null) for revsion 
111-0ae2df3e9cafc2bb407323ab57e6c2c9 of documment: 
f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 error:(null)
Staring Compact
Finished Compact

Out of curiosity, I opened the corresponding SQLite file. There were 52 
revisions for this document. Running the resolution process multiple times 
did not increase this count. Also, all of the revisions returned above have 
a parent of NULL and their current flag set to "1". Nor could I find any 
revisions with parents that match any of the above sequence numbers, which 
I would expect this process to create. 

When I queried for revisions for this document with a null parent and their 
current flag set to 1 I received the exact same group of revisions 
indicated as in conflict listed above. 

sequence|doc_id|revid|parent|current|deleted|no_attachments
26015|5574|"111-0ae2df3e9cafc2bb407323ab57e6c2c9"|<NULL>|1|0|1
35199|5574|"112-edd492acdcaef62e8fbe83f8c7b7fedd"|<NULL>|1|0|1
35337|5574|"114-b119801ccce39c63560dd7a3576a38ea"|<NULL>|1|0|1
35338|5574|"113-3eb619c463767d3449652dc553c196a9"|<NULL>|1|0|1
35358|5574|"115-4643765c558bddde1eddb0ebd71039c5"|<NULL>|1|0|1
36748|5574|"118-a8bee8abf22403a04703d29dc8e84325"|<NULL>|1|0|1
36855|5574|"107-0aec4a3c4f6b41af463d052776f70c23"|<NULL>|1|0|1
36859|5574|"110-5502833a249b6ce4f7ca6e2ea2b40cb7"|<NULL>|1|0|1
36860|5574|"106-06ab0852a09ffd7a74a8679ae9e6d2c6"|<NULL>|1|0|1
36861|5574|"116-b9df055884bcd38a28d4db14582c608a"|<NULL>|1|0|1
36870|5574|"119-36bd4f3d615121925ea10e464dff9e84"|<NULL>|1|0|1
36873|5574|"120-c438665ca9877ee388d91fbb71f3d33f"|<NULL>|1|0|1
36879|5574|"121-0c51102053b54432ea48dad131c5cf86"|<NULL>|1|0|1

So, it seems that we have a revision tree with multiple roots. Could it be 
that the revision tree for this document is corrupt? 

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/53bca247-c6fc-441f-b02d-be33b7c8ad3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to