Commit Graph

530 Commits

Author SHA1 Message Date
Thomas Goyne 83b4d8ded2 Make RealmCoordinator::run_async_notifiers a bit less gross 2016-05-11 16:08:30 -07:00
Thomas Goyne 32b05314f5 Remove extraneous semicolons 2016-05-11 16:08:30 -07:00
Thomas Goyne 2ce0e2e37f Remove transaction log handlers for old pk functions 2016-05-11 16:08:30 -07:00
Thomas Goyne c12d87427a Clean up includes and forward declarations a bit 2016-05-11 16:08:30 -07:00
Thomas Goyne 155d949793 Only track inserts and deletes for tables being queried directly
# Conflicts:
#	src/collection_notifications.cpp
#	src/collection_notifications.hpp
2016-05-11 16:08:30 -07:00
Thomas Goyne a86265f4dc Move CollectionChangeBuilder to background_collection.hpp 2016-05-11 16:08:30 -07:00
Thomas Goyne bc78c02e9d Fix quadratic runtime of move_last_over() parsing 2016-05-11 16:08:30 -07:00
Thomas Goyne 2e80716629 Improve performance of move mapping when there are a lot of deletions 2016-05-11 16:08:30 -07:00
Thomas Goyne ae9516dbb7 Improve performance for large numbers of deletions 2016-05-11 16:08:30 -07:00
Thomas Goyne 8623aa6c6b Actually unregister List notifiers when the List is destroyed 2016-05-11 16:08:30 -07:00
Thomas Goyne 45705b18d2 Build all of the fuzzer variants 2016-05-11 16:08:30 -07:00
Thomas Goyne 510c049855 Don't run the LV commands at all if fuzzing non-linkview 2016-05-11 16:08:30 -07:00
Thomas Goyne 5eb18ed487 Allow non-empty no-op changesets when there should be no notification in the fuzzer 2016-05-11 16:08:30 -07:00
Thomas Goyne 7a75e2bae2 Use a better data structure for IndexSet
Switch to a chunked vector-of-vectors which makes mid-insertions on large sets
much faster, and cache the begin/end/count for each chunk to make lookups much
more cache-friendly.
2016-05-11 16:08:30 -07:00
Thomas Goyne f600487769 Speed up CollectionChangeBuilder::move_over() 2016-05-11 16:08:30 -07:00
Thomas Goyne f051337cd3 Rename erase_and_unshift() to erase_or_unshift() 2016-05-11 16:08:30 -07:00
Thomas Goyne b81c950056 Put the fuzzer realm file in the working directory
mkstemp() eventually becomes a bottleneck due to thousands of stale
files from crashes.
2016-05-11 16:08:30 -07:00
Thomas Goyne dd336120b2 Fix compilation with GCC 4.9 2016-05-11 16:08:30 -07:00
Thomas Goyne 784c34e052 Add property.hpp to HEADERS 2016-05-11 16:08:30 -07:00
Thomas Goyne bab5540cf6 Fix incorrect results when the second-to-last row is deleted 2016-05-11 16:08:30 -07:00
Thomas Goyne 20d9da973b Make List and Results notifications more consistent
Deliver the initial results for both of them and include the changeset
in the initial delivery for both, rather than having them behave weirdly
differently.
2016-05-11 16:08:30 -07:00
Thomas Goyne 7a74a22558 Fix tracking of modifications after linkview moves 2016-05-11 16:08:30 -07:00
Thomas Goyne a0b16305c9 Fix dangling pointers to a reallocated vector when there are multiple source versions for handover 2016-05-11 16:08:30 -07:00
Thomas Goyne ef632804ef Clean up stale moves for linkviews even without a merge 2016-05-11 16:08:30 -07:00
Thomas Goyne feed7c3479 Update moves when there is another move to exactly the previous move target 2016-05-11 16:08:30 -07:00
Thomas Goyne 0a3158ce74 Fix marking deletions when chaining move_last_over() 2016-05-11 16:08:30 -07:00
Thomas Goyne 51edc6909c Log more in the fuzzer 2016-05-11 16:08:30 -07:00
Thomas Goyne 1289c4806c Fix handling of move_last_over() on the second-to-last row 2016-05-11 16:08:30 -07:00
Thomas Goyne 47cee90d32 Refactor the fuzzer a bit 2016-05-11 16:08:30 -07:00
Thomas Goyne edc0d1fc4a Improve and expand the changeset calculation tests 2016-05-11 16:08:30 -07:00
Thomas Goyne 0e11a791e9 Improve and expand the IndexSet tests
This gets index_set.cpp back up to 100% line coverage from just the
targeted unit tests.
2016-05-11 16:08:30 -07:00
Thomas Goyne dc7ddfae84 Treat Results from LinkViews as if they were sorted for diff calculations 2016-05-11 16:08:30 -07:00
Thomas Goyne 71911ee221 Add support for wrapping a LinkView in a Results 2016-05-11 16:08:30 -07:00
Thomas Goyne 1b48c71932 Speed up transaction log parsing for queries 2016-05-11 16:08:30 -07:00
Thomas Goyne 5d5f504543 Greatly speed up sorted changeset calculations 2016-05-11 16:08:30 -07:00
Thomas Goyne 88a3b6ed00 Speed up the IndexSet combining operations 2016-05-11 16:08:30 -07:00
Thomas Goyne fdeb80f970 Speed up IndexSet::count() a bit 2016-05-11 16:08:30 -07:00
Thomas Goyne 7f5277a97b Run RealmCoordinator::on_change() on a different thread when using tsan 2016-05-11 16:08:30 -07:00
Thomas Goyne 059f907a4a Make sorted move calculations a bit less gross 2016-05-11 16:08:30 -07:00
Thomas Goyne 1a8a56d10a Use binary search in IndexSet::find() 2016-05-11 16:08:30 -07:00
Thomas Goyne f1f0327146 Speed up unsorted changeset calculations by eliminating most calls to count() 2016-05-11 16:08:30 -07:00
Thomas Goyne c6def6b814 Don't parse the transaction logs on the background thread if no change info is needed 2016-05-11 16:08:30 -07:00
Thomas Goyne 9503a3fc03 Always send an empty changeset to the first call of a Results notification callback 2016-05-11 16:08:30 -07:00
Thomas Goyne b5bd00005c Skip collecting change information when it isn't needed 2016-05-11 16:08:30 -07:00
Thomas Goyne e65ad4d413 Discard moves which are turned into no-ops when merging 2016-05-11 16:08:30 -07:00
Thomas Goyne cfb9f0635c Fix calculation of moves for unsorted queries 2016-05-11 16:08:30 -07:00
Thomas Goyne d22c65f28a Partially split out the code for calculating changesets from the struct for delivering them 2016-05-11 16:08:30 -07:00
Thomas Goyne a4298dd92c Remove an unused function 2016-05-11 16:08:30 -07:00
Thomas Goyne b920f62ca5 Comment and clean up the Notifiers/BackgroundCollection 2016-05-11 16:08:30 -07:00
Thomas Goyne 4ec1090c05 Rename AsyncQuery to ResultsNotifier 2016-05-11 16:08:30 -07:00