summaryrefslogtreecommitdiffstats
path: root/common/datastorequery.cpp
Commit message (Collapse)AuthorAge
* Add overlap queryMinijackson2018-06-11
|
* Caught another case of empty uid in readEntityChristian Mollekopf2018-05-17
|
* Fixed a readEntity call with empty uidChristian Mollekopf2018-05-17
| | | | | | Filtered entites are still passed through as removal, but if there is no other value for the reduction, the reduction result is empty.
* Properly deal with filtered entities in reduced queries.Christian Mollekopf2018-02-22
| | | | Filtered entities would still end up in the entities list before.
* Handle the removal of the last item cleanlyChristian Mollekopf2018-02-22
|
* Deal with removals in reduced queriesChristian Mollekopf2018-02-22
|
* Remember aggregated idsChristian Mollekopf2018-02-21
|
* Fixed crashes due to concurrently running queries.Christian Mollekopf2018-02-15
| | | | | | | | | | | | | | | | | | | | | | | | A single QueryRunner should never have multiple workers running at the same time. We did not properly enforce this in case of incremental updates coming in. The only way I managed to reproduce the crash: * Open a large folder with lots of unread mail in kube * Select a mail in the maillist and hold the down button * This will: * Repeatedly call fetch more * Trigger lot's of mark as read modifications that result in notifications. * Eventually it crashes somewhere in EntityStore, likely because of concurrent access of the filter structure which is shared through the state. We now ensure in the single threaded portion of the code that we only ever run one worker at a time. If we did receive an update during, we remember that change and fetch more once we're done. To be able to call fetch again that portion was also factored out into a separate function.
* Xapian based fulltext indexingChristian Mollekopf2018-02-11
| | | | | This cuts into the sync performance by about 40%, but gives us fast fulltext searching for all local content.
* Fixed warningChristian Mollekopf2018-02-07
|
* Optimized the incremental update case.Christian Mollekopf2017-10-08
| | | | | | | | | | | | This brings the incremental closer to a regular query (about 1.5 times as bad instead of 3.5 times). For a comparison look at MailQueryBenchmark::testIncremental() The optimization is built on the assumption that we i.e. get an update with 100 revisions, and thus the optimization applies to the case where we have multiple revisions within that batch that are part of the same reduction. In such a case we can avoid redoing the reduction lookup over and over.
* commentsChristian Mollekopf2017-09-13
|
* Simplified codeChristian Mollekopf2017-09-12
|
* Clarified codeChristian Mollekopf2017-09-12
|
* Fixed incremental queriesChristian Mollekopf2017-06-10
| | | | | | The incremental querying broke as soon as a revision update came in since it would nuke the base-set. This fixes it, but it's definitely not pretty.
* Maintain the query state instead of using the offset.Christian Mollekopf2017-03-22
| | | | | | | | | | Instead of using the offset to skip over old results requires recalculating them, and resulted in some cases in results being added multiple times to the model. By just maintaining the state we can apply the offset directly to the base-set, and maintain the state in reduction etc. which is necessary to continue streaming results while making sure we don't report anything twice.
* Handle filtered thread-leaderChristian Mollekopf2017-03-19
|
* Avoid triggering reinsert if the leader doesn't change.Christian Mollekopf2017-02-13
|
* Fixed reduction updates with stateful query.Christian Mollekopf2017-02-13
| | | | | | Some filters need to maintain state between runs in order to be able to emit only what has changed. This now also make reduction work for live queries.
* Better debug outputChristian Mollekopf2017-02-09
|
* Removed unnecessary debug output.Christian Mollekopf2017-02-01
|
* Ensure blooming queries filter as they shouldChristian Mollekopf2017-01-31
| | | | After the initial bloom, it should turn into a regular filter.
* Fixed build issues with pedantic enabledChristian Mollekopf2017-01-12
|
* Don't turn modifications into creationsChristian Mollekopf2017-01-04
|
* React to removals in reduced live-query.Christian Mollekopf2017-01-03
|
* Introduced Log::ContextChristian Mollekopf2016-12-22
| | | | | | | To have hierarchical debug output we have to pass around something at run-time, there is no reasonable alternative. Log::Context provides the identifier to do just that and largely replaces the debug component idea.
* User querybaseChristian Mollekopf2016-11-04
|
* Separated the base filter from the rest of the query.Christian Mollekopf2016-11-04
|
* Reset aggregation when we get to a new value.Christian Mollekopf2016-10-27
| | | | Otherwise i.e. the counter will only ever count up
* CleanupChristian Mollekopf2016-10-21
|
* Removed EntityReaderChristian Mollekopf2016-10-21
|
* Use the ApplicationDomainType in the queries as well.Christian Mollekopf2016-10-21
| | | | | We have to access properties, so we need the mapper anyways, and the ApplicationDomainType type shouldn't be a large overhead anyways.
* We no longer access the typeindex directlyChristian Mollekopf2016-10-21
|
* Refactor how the storage is used.Christian Mollekopf2016-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial refactoring to improve how we deal with the storage. It does a couple of things: * Rename Sink::Storage to Sink::Storage::DataStore to free up the Sink::Storage namespace * Introduce a Sink::ResourceContext to have a single object that can be passed around containing everything that is necessary to operate on a resource. This is a lot better than the multiple separate parameters that we used to pass around all over the place, while still allowing for dependency injection for tests. * Tie storage access together using the new EntityStore that directly works with ApplicationDomainTypes. This gives us a central place where main storage, indexes and buffer adaptors are tied together, which will also give us a place to implement external indexes, such as a fulltextindex using xapian. * Use ApplicationDomainTypes as the default way to pass around entities. Instead of using various ways to pass around entities (buffers, buffer adaptors, ApplicationDomainTypes), only use a single way. The old approach was confusing, and was only done as: * optimization; really shouldn't be necessary and otherwise I'm sure we can find better ways to optimize ApplicationDomainType itself. * a way to account for entities that have multiple buffers, a concept that I no longer deem relevant. While this commit does the bulk of the work to get there, the following commits will refactor more stuff to get things back to normal.
* Support for generic aggregations.Christian Mollekopf2016-10-10
|
* count as a first aggregation functionChristian Mollekopf2016-10-06
|
* A better resource filter apiChristian Mollekopf2016-10-05
|
* Specify base set as part of the filter stages in the query.Christian Mollekopf2016-10-05
|
* Resource subqueriesChristian Mollekopf2016-10-04
|
* Support for subqueries.Christian Mollekopf2016-10-04
| | | | | | This allows us to match properties from a subquery. Unfortunately this also means that DataStoreQuery needs access to all type implementations to issue the subquery (for potentially another type).
* Use the Query::filter api.Christian Mollekopf2016-09-27
|
* New query apiChristian Mollekopf2016-09-27
|
* BloomingChristian Mollekopf2016-09-26
|
* The threading reduction is working.Christian Mollekopf2016-09-26
|
* A new query systemChristian Mollekopf2016-09-23
|
* A first draft of the threading algorithm.Christian Mollekopf2016-09-20
|
* Refactored the query part of the entity reader into DataStoreQuery.Christian Mollekopf2016-09-19
DataStoreQuery now encapsulates the low-level query that operates directly on the storage. It no longer has access to the resource buffers, and is instantiated by the type implementation, so we can specialize the query alogorithm per type, but not per resource. This will allow us to implement the threading queries for the mailtype.