Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove CBLDocument from database document cache when purged #3

Closed
wants to merge 1 commit into from

Conversation

pegli
Copy link
Contributor

@pegli pegli commented Feb 6, 2013

This is the fix to remove a purged document from the database cache that I submitted to the TouchDB-iOS project, including the fixes that you suggested in the old pull request.

@snej
Copy link
Contributor

snej commented Feb 10, 2013

Merged as 3b389c7.

@snej snej closed this Feb 10, 2013
@nl nl mentioned this pull request Nov 9, 2013
@pasin pasin mentioned this pull request Oct 30, 2015
pasin added a commit that referenced this pull request Mar 3, 2021
I have made two separate commits when updating Lite-Core: Before and After enabling version-vector. Here are summary of the changes:

**Before enabling version-vector:**
* Used `c4doc_getProperties` instead of `c4doc.selectedRev.body` and ensured to retain the body through the life of the document according to its selected revision. This has been done in CBLC4Document that wraps and retains C4Document object.
* Moved `-encode:` method from `CBLMutableDocument` to `CBLDocument` itself as overriding is not needed anymore.
* Used `c4db_getDoc` instead of `c4doc_get` as `c4doc_get` is semi-deprecated.
* Used `C4DocContentLevel.kDocGetAll` when creating a conflicting doc in `CBLDatabase`’s `-resolveConflictInDocument:` as we need to select a conflicting revision.
* Added another constructor in `CBLDocument` to be able to specify `C4DocContentLevel` when using `c4db_getDoc`.
* Disabled some tests per the open issues.
* Open issues: [CBL-1707](https://issues.couchbase.com/browse/CBL-1707), [CBL-1709](https://issues.couchbase.com/browse/CBL-1709), [CBL-1710](https://issues.couchbase.com/browse/CBL-1710).

**After enabling version-vector:**
* When calling `c4doc_resolveConflict`, always send `mergedFlags` so it will depend on LiteCore whether it wants to use the flags or not.
* Simplified testConflictResolutionDefault.
* Disabled failed tests per the open issues.
* Open Issue: [CBL-1713](https://issues.couchbase.com/browse/CBL-1713), [CBL-1715](https://issues.couchbase.com/browse/CBL-1715).

**Information about version vector and lite-core api changes by @snej**
* [LiteCore Version Vector Progress Report](https://docs.google.com/document/d/1OwHqwctXNd6bGqkhlPx8jWvHDnjdyLK3YU0iQHCRrWQ)
* [LiteCore Version Vector Progress Report #2](https://docs.google.com/document/d/1Wa5YaoPXgciGGVICY65JtiYhqhbeD64-tuptmliEGoA)
* [LiteCore Version Vector Progress Report #3](https://docs.google.com/document/d/153s2oD5qdtYGBDNYtYH6_c0wyrHiKVXF-23uNyA8lJA)
* [Information about c4db_getDoc and c4db_get](https://github.com/couchbase/couchbase-lite-core/blob/master/C/include/c4Document.h#L101-L122).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants