summaryrefslogtreecommitdiffstats
path: root/common/storage/key.h
Commit message (Collapse)AuthorAge
* Separate UIDs and Revisions in main databasesRémi Nicole2018-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Change revision type from `qint64` to `size_t` for LMDB in a couple of places (LMDB supports `unsigned int` or `size_t` which are `long unsigned int` on my machine) - Better support for database flags (duplicate, integer keys, integer values for now but is extensible) - Main databases' keys are now revisions - Some databases switched to integer keys databases: - Main databases - the revision to uid mapping database - the revision to entity type mapping database - Refactor the entity type's `typeDatabases` method (if in the future we need to change the main databases' flags again) - New uid to revision mapping database (`uidsToRevisions`): - Stores all revisions (not uid to latest revision) because we need it for cleaning old revisions - Flags are: duplicates + integer values (so findLatest finds the latest revision for the given uid) ~~Problems to fix before merging:~~ All Fixed! - ~~Sometimes Sink can't read what has just been written to the database (maybe because of transactions race conditions)~~ - ~~Most of the times, this results in Sink not able to find the uid for a given revision by reading the `revisions` database~~ - ~~`pipelinetest`'s `testModifyWithConflict` fails because the local changes are overridden~~ ~~The first problem prevents me from running benchmarks~~ Reviewers: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D14974
* Avoid unnecessary Identifier conversions in performance ciritical code.Christian Mollekopf2018-07-28
| | | | | This fixes the performance regressions to a state where we are roughly at the same performance as pre Identifier (but not any better either).
* Use Key API in SinkSHRémi Nicole2018-07-27
| | | | | | | | | | | | | | | | | | Summary: Depends on D14289 - Fixes the `sinksh inspect …` command - Introduces `isValid`, `isValidInternal` and `isValidDisplay` static functions in Key, Identifier and Revision I still have to do a more extensive search for induced bugs in other commands Reviewers: cmollekopf Reviewed By: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D14404
* Use Key API in DataStoreQueryRémi Nicole2018-07-27
| | | | | | | | | | Reviewers: cmollekopf Reviewed By: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D14099
* New Key API in storage layerRémi Nicole2018-07-27
Summary: - Use object oriented paradigm for Keys / Identifiers /Revisions - "Compress" keys by using byte representation of Uuids - Still some cleaning left to do - Also run some benchmarks - I'm questioning whether files other than entitystore (tests excluded) are allowed to access this API Reviewers: cmollekopf Reviewed By: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D13735