Skip to content
Commit af4cb173 authored by Christian Mollekopf's avatar Christian Mollekopf
Browse files

Fixed refcounting in ETM and Monitor

This is a combination of several commits in order to fix the buffering
in the ETM.

In particular it incorporates the following changes:

1.

Fixed fetching of items that exited the buffer after being referenced.

After a collection exits the buffer after being referenced,
the monitor no longer emits updates for this collection.
It is therefore necessary for the ETM to refetch the items to get missing updates.

2. (regarding the removal of the MAXITEMS limit)

Don't keep outdated copies of items.

A collection is purged if reference counting is used and a collection
exits the buffer after being referenced. By not purging the items, it becomes
possile that we miss updates, and when refetching the collection because it's
referenced again, we don't emit change notifications because the items were in the model already.

Since we anyways have to fetch all items, we can as well purge all items.

Alternatives:
* compare revisions and emit change notifications if necessary in itemsFetched
* Still emit notifications in the monitor for modifications only

3.

Only buffer a collection after the refcount reaches zero.

Before, a collection that was dereffe'd at least once would
already be buffered (although the refcount is still >0), resulting in
the buffer being occupied by reffe'd collections (which is pointless).

BUG: 312460
REVIEW: 113680
FIXED-IN: 4.11.4
parent ddb5c8a4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment