summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Enable caching of pages in hbtreeAli Akhtarzada2012-03-204-37/+106
| | | | | | | | | | | | | | | | No need to constantly read pages from disk. Added a cache and a lru queue to determine which pages can be pruned from the cache Change-Id: Ia0fdc670dacc07e901027e71197b08e961da4142 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Merge remote-tracking branch 'gerrit/master' into hbtreeDenis Dzyubenko2012-03-2025-167/+509
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/daemon/jsondbindex.cpp src/daemon/jsondbindex.h src/daemon/jsondbobjecttable.cpp src/daemon/jsondbobjecttable.h tests/auto/daemon/testjsondb.cpp Change-Id: Id0302c63a8f9fd58413e9b20c706a269e27213b2
| * Added const specificator to functions in JsonDbSettingsDenis Dzyubenko2012-03-201-13/+12
| | | | | | | | | | Change-Id: Ic3e9922bee3c2fc149ce15431bc985af04f22443 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Make autotests pass again.Tapani Mikola2012-03-205-89/+170
| | | | | | | | | | | | | | | | | | | | FIx a bug in JsonDbOwner::setCapabilities and update tst_client testcase so that all security checks also pass. Also move passwd/grp reading to JsonDbOwner to be able to call it also from JsonDbView::create[Reduce/Map]Defifnition. Change-Id: If22f8d8ec08a258b070b5fc601d2fd68c7ee38a2 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Watching a view type triggers a view update.Jamey Hicks2012-03-1911-16/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Registering QJsonDbWatcher on a view type triggers an update of the view. Rebased onto 'Fixed qjsondbwatcher autotest'. Fixes Bug #6707 If a watcher is registered on a view type, trigger an update of the view if the view has not been updated since initialStateNumber, where initialStateNumber of zero is the current state of the partition. Change-Id: I55f39f67f4a08f1079ad674d1d3e0119a8ea6ac9 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Fixed qjsondbwatcher autotestDenis Dzyubenko2012-03-191-0/+1
| | | | | | | | | | | | | | | | jsondb daemon should be started with -base-name argument, otherwise it will create a folder with a given name which will not be removed by removeDbFiles(). Change-Id: I26fbe9daae2e268e0327788413e97ae9d9bb6c21 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Fix memory leak in connection handlingKevin Simons2012-03-191-3/+4
| | | | | | | | | | Change-Id: Ia08745bf8f222402900499dc1419bcc544f50601 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Add case preference feature for indexLiang Qi2012-03-1911-12/+151
| | | | | | | | | | | | | | It works with collation. Change-Id: Icd8e5ab9d707b822c7f1d5d1c75b6d1b8c6237cc Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Temporarily reinstate "delete by query"Kevin Simons2012-03-192-9/+17
| | | | | | | | | | | | | | We'll remove it when we drop all of clientcompat Change-Id: I88d4e132d1455ff5491478bed64cfd9683ef5778 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Fix crash related to notifications on the ephemeral partition.Kevin Simons2012-03-194-14/+22
| | | | | | | | | | | | | | Also add a testcase for the ephemeral partition Change-Id: I26773ae2d496559d58a8622db041bcc962bd8490 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Append .System to the default partition name if not already presentKevin Simons2012-03-191-1/+3
| | | | | | | | | | | | | | | | | | This is a temporary fix to make the partition names work the way they did before the major refactoring. This should be replaced by file-based partition definitions in the near future. Change-Id: Ie4c1f3b351cc65a40e00406a57b06485361ab1c4 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Compile in C++11 mode.Lars Knoll2012-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | QBasicAtomicInt does not have and cannot have operator=, but this is being used in the code. Simply switching to QAtomicInt fixes the problem. Change-Id: I9c2dfc92b773a6ec53365eecb66a81492fc39c4f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * Removing transactionless cursors from JsonDbIndex and friends.Carlos Manuel Duclos Vergara2012-03-193-8/+41
| | | | | | | | | | | | Change-Id: I141da020b99bb44d84dfedd24b5da26c5e114333 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Hbtree remove capability to recover unsynced commitAli Akhtarzada2012-03-193-950/+447
| | | | | | | | | | | | | | | | | | | | | | Removed marker buffers and made it recoverable to synced page. Changed collectible algorithm to collect everything unsynced Added residue pages to account for merges, collapses and overflow pages Marker is updated in memory after commit now. Touching pages instatnly reuses them if they're not synced Change-Id: I42d9810391b10ca7559556576120351d89d072fc Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Merge remote-tracking branch 'gerrit/master' into gerrit-masterDenis Dzyubenko2012-03-1984-4896/+4984
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/daemon/daemon.pri src/daemon/jsondbindex.cpp src/daemon/jsondbpartition.cpp src/daemon/jsondbpartition.h tests/auto/auto.pro tests/auto/daemon/testjsondb.cpp Change-Id: I223614ab7146e3a6a05f2b484b8277d738b8deb9
| * Add support for old notifications to QJsonDbWatcherJamey Hicks2012-03-1613-68/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example, assuming stateNumber 2962 is in the recent past: QtJsonDb::QJsonDbWatcher *watcher = new QtJsonDb::QJsonDbWatcher; watcher->setQuery(QStringLiteral("[?_type=\"Foo\"]")); watcher->setInitialStateNumber(2962); connection->addWatcher(watcher); ... QList<QJsonDbNotification> event = watcher->takeNotifications(); If stateNumber is 0xFFFFFFFF, then sends a "create" notification for every object currently in the specified partition. Applications can use this to find all matching objects and all changes to those objects going forward. Fixes Bug #7276. Also fixes Bug #7300. Change-Id: Icd01d05f89c8480804ea8ef09061022f107091f1 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Indexes were not getting their name set properly on reopenKevin Simons2012-03-163-15/+19
| | | | | | | | | | Change-Id: Ic92675c28bbe1b5c1f92ee10ffd37218a9ed6597 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * small fix for DBServer::findPartitionJamey Hicks2012-03-161-1/+2
| | | | | | | | | | Change-Id: Ie4802c385eb67bf1436ed91a9162fb24cc8aa420 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Auto test for QJsonDbWatcherJamey Hicks2012-03-163-0/+306
| | | | | | | | | | | | | | Change-Id: Ic720eb56948d6918cb7d9268980e368a4ad5ba4b Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
| * Add case sensitive feature for indexLiang Qi2012-03-1611-32/+124
| | | | | | | | | | Change-Id: Ibcbb922d881b172f9e1119a4ead9dcdfae3185f0 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Remove the old methods for writing to JsonDbPartitionKevin Simons2012-03-165-142/+17
| | | | | | | | | | | | | | Now the only way to write is to use updateObject/updateObjects Change-Id: I33ce96b02ea35416c4ad5f311572863d796f1abf Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Dead code removalKevin Simons2012-03-161-13/+0
| | | | | | | | | | Change-Id: I7b91f907ea7c0adb0af501f1f53e4e350f4d59a0 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Move IndexQuery into its own fileKevin Simons2012-03-167-537/+669
| | | | | | | | | | Change-Id: I761fae284eb8d094cb0742730b6a86752030fd7b Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Inline JsonDbPartition name getter/setterKevin Simons2012-03-162-11/+2
| | | | | | | | | | Change-Id: I06d915c654d8baf49abbecb1725b9be002b4ad3f Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Remove some leftover extern variable declarationsKevin Simons2012-03-161-12/+0
| | | | | | | | | | Change-Id: I0515cc4fd8a34611f7c1c2f65c20b3f0cf717510 Reviewed-by: Liang Qi <liang.qi@nokia.com>
| * Remove unused JsonDbPartition::doMultiIndexQueryKevin Simons2012-03-162-79/+0
| | | | | | | | | | Change-Id: Ie3ece4b7654c4f54ada8ca6caef852e155713ef4 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Refactoring: remove JsonDb classKevin Simons2012-03-1555-4055/+2734
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first major step in separating out the partition functionality into its own library. It completely removes the JsonDb class and splits the functionality between DBServer and JsonDbPartition. The goal of this patch is to minimize the changes to existing code. To that end, a great deal of code was copied-and-pasted from jsondb.cpp. Subsequent patches will further the refactoring, removing the redundant code created by this patch. Change-Id: I33347b802d53c00375829f1a26277bb142a272da Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Removing transactionless cursor from jsondbpartition.Carlos Manuel Duclos Vergara2012-03-142-3/+8
| | | | | | | | | | Change-Id: If26bd5d6e2a5174dd73a0e739666a496a53fc114 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * The warning should be given when the amount of the queries is more than 1.Sergey Hambardzumyan2012-03-141-1/+3
| | | | | | | | | | Change-Id: Ie1b5dbd3d9a2c7985274628c54a80241223ac36a Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * Test change in notification query match as create or remove on update().Jamey Hicks2012-03-143-14/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #198. Treat change in query match as create or remove as appropriate even if object was only updated. For the purposes of notification, if the query changes from not matching to matching consider it to be a "create". If it changes from not matching to matching consider it to be a "remove". Change-Id: I67881bfe65a0ca9a9ccf98a0d9a5d3a520412d33 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * fix remove response missing _version problemBai Jing2012-03-141-0/+1
| | | | | | | | | | | | | | Bug #7303 Change-Id: Ic09ac6d4816dd6899bee72b3c712b0f0d5ab9661 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * Security fixTapani Mikola2012-03-144-12/+93
| | | | | | | | | | | | | | | | | | | | A user not belonging to any group got access to everything. This commit fixes it and adds a testcase to test it. Also added the cleanup of passwd and group to tst_client. Change-Id: I24d08e5f0b2d380f6f219a3603d61b6b37a8bb4a Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Added createUuidFromString to jsondb map/join proxy.Jamey Hicks2012-03-135-7/+51
| | | | | | | | | | | | | | | | | | | | Enables tracking view objects across updates to source objects and reducing the number of view updates caused by source object changes. Fixes Bug #6807. Change-Id: I81be62dff37bf1426d2bc041852b58523566ce24 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Detect updated view objects in MapsJamey Hicks2012-03-133-47/+95
| | | | | | | | | | | | | | | | | | When emitted objects have _id or _uuid, detect if they are an update from the previous value. If so, if the value is unchanged do nothing, otherwise call update() instead of create(). Change-Id: I50d307214f848737298cec2bd5e18515e23a86ae Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Correct the documentation for the propertyFunction property of Index objectsKevin Simons2012-03-131-2/+3
| | | | | | | | | | Change-Id: I65c6fe94763bad756fda2cc9f546b0d0125c9456 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
| * btree marker rollback not reading from correct metaAli Akhtarzada2012-03-131-1/+1
| | | | | | | | | | Change-Id: I2c4c950cce43f02c42f41b62d7d889f91fc085f6 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * Free pages while trying to find a valid meta pageAli Akhtarzada2012-03-131-0/+9
| | | | | | | | | | Change-Id: I7ffc26149cbfe2e6b92683ec7a104d27a7d357d3 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
| * Remove pin of qtbase for qtjsondb.Sergio Ahumada2012-03-131-1/+1
| | | | | | | | | | Change-Id: I7c4e75a9e0329dbeffc81fa1c95d7c784de9c9d9 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
| * Disable two lines of test codeLiang Qi2012-03-131-2/+3
| | | | | | | | | | | | | | | | | | At least got the wrong order for the two characters under zh_CN@stroke. It should be a bug in cldr collation data. Comment them for now. Change-Id: Icb0877d2273bf3746a79fbf60a5f93edc17268d0 Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
| * Example application for the new C++ client APIKevin Simons2012-03-139-0/+600
| | | | | | | | | | Change-Id: I72b1dbbc7af8c764798d973a954969fec235f390 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* | hbtree: Add overflow flag to nodes moved aroundAli Akhtarzada2012-03-131-0/+1
| | | | | | | | | | | | | | | | Was not adding the overflow flag to a page when a node was trasfered to it from another page. Change-Id: Ie7b5978e0f4f7073157bb77c24114d0997e0ced8 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Added btrees::insertItem benchmark to check performance of single put.Denis Dzyubenko2012-03-131-0/+37
| | | | | | | | | | Change-Id: Ie44bdfe33e3a03dd56f32ce133eb2457bf42b8e1 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | Changed btrees benchmark to remove if branch from QBENCHMARK blockDenis Dzyubenko2012-03-131-25/+49
| | | | | | | | | | Change-Id: Ide97d53cad1d49b7af3720a437c2dff26dcc929b Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | Use pwrite instead of lseek+write in hbtreeDenis Dzyubenko2012-03-121-4/+1
| | | | | | | | | | Change-Id: I90d4971d4b1ad3b6233d59e0ca9920cb39506fb8 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | Prune hbtree history nodes in pages that are reclaimed on openAli Akhtarzada2012-03-123-7/+36
| | | | | | | | | | | | | | | | | | | | When there's an ungraceful shutdown, the next open colelcts all reusable pages. The referenced pages may refer to some of these pages in their history and when they are touched, the touched page referes to it's old self, which is wrong. This fixes that issue. Change-Id: I24616a76762552276c34cc877909b4db29f486b5 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | Add hbtree test for all cases of marker corruptionAli Akhtarzada2012-03-121-0/+130
| | | | | | | | | | Change-Id: I42c209c547fc8c53fffdd0a796a331ef440cf6e9 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | hbtree sync bugAli Akhtarzada2012-03-121-3/+12
| | | | | | | | | | Change-Id: Iba162ae9bcfdcf88f63d736b539dfe7e220af7aa Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | Hbtree persist residue history nodes that can't fit anywhereAli Akhtarzada2012-03-122-128/+151
| | | | | | | | | | | | | | | | | | | | Added ability to add history nodes to marker pages in the rare case that there's no space for history nodes. And fixed rebalance so that it adds history pages to the residue list when a tree is emptied or collapsed Change-Id: Ic7a9962665d6b2dd612017945ac13d9d4cec37fb Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | change hbtree split policyAli Akhtarzada2012-03-121-2/+25
| | | | | | | | | | | | | | | | | | Was splitting pages based on number of nodes, but performing rebalancing is based on how full a page is. Changed the split node to chose the where to split based on how full a node is as well. Change-Id: I1695a918bd6e5f7847565ba24220714900965eeb Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* | Move node bug from rebalanceAli Akhtarzada2012-03-121-6/+4
| | | | | | | | | | Change-Id: I4067c1bd3d940dad3bcd2b4ca2f8d3ee582a42bb Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>