161 Commits

Author SHA1 Message Date
5699981dde Add dump_rdbtree 2017-08-25 15:27:55 +02:00
e9a2358c29 RdbTree::checkTree(): check spiderrequetsts correctly
Was incorrectly trigering a shutdown when the spiderrequest was containing a docid (as it always does from query-reindex)
2017-07-14 17:17:58 +02:00
ec2a25ab69 Don't lock RdbTree/RdbBucket when calling isSaving function. It's already an atomic. 2017-05-29 14:16:51 +02:00
7b4a2ba072 Use m_waitingTree lock to make sure m_waitingTree & m_waitingTable are in sync 2017-05-19 01:12:40 +02:00
d773a14447 Code style changes & move variable declaration closer to use 2017-04-26 11:57:30 +02:00
17b0c56aae Use KEYNEG instead of checking key bit directly 2017-04-25 15:09:36 +02:00
a7bfb39b9d Remove RdbTree/RdbBuckets/Rdb isWritable. We shouldn't need to disable writes just because we're saving. 2017-04-24 10:36:29 +02:00
c84408d7d0 Make sure m_isSaving & m_needsSave is protected by mutex for both RdbBuckets & RdbTree 2017-04-21 12:29:03 +02:00
fd78be54a3 Set isSaving/needsSave variable right after saving (align with changes made in RdbBuckets) 2017-04-21 11:47:45 +02:00
760a372bd0 Code style changes 2017-04-21 11:46:59 +02:00
cf5452c030 Added RdbTree::collExists() just like RdbBuckets 2017-04-20 15:14:33 +02:00
b27ac02f3a Replace SPIDERDBKEY define with typdef spiderdbkey_t 2017-04-06 14:45:48 +02:00
afa39b53d9 We should always save with the dbname set in RdbTree::set. 2017-04-05 12:37:00 +02:00
eb1911de67 Fix recursive lock when thread is not enabled 2017-04-03 16:01:05 +02:00
94ed93ea04 Add lock to RdbTree::fastSave_unlocked and rename to RdbTree::fastSave 2017-03-31 17:45:21 +02:00
44bf13d68f Move declaration closer to use 2017-03-31 15:36:13 +02:00
7a0b049781 Commented out dead code (still useful in the future) 2017-03-31 15:27:01 +02:00
1349b48c41 Add locks to RdbTree.
Some code style changes/comment removal.
Moved treetest which was in main.cpp to unittest
2017-03-31 12:59:40 +02:00
c6e63b6cd0 Use m_rdbId instead of checking m_dbname 2017-03-30 17:28:43 +02:00
2eaee48d71 Code style changes & remove commented out code 2017-03-30 15:59:18 +02:00
475f2eebe0 Extract common code out into functions 2017-03-30 14:03:43 +02:00
4e6fac1832 Remove unused RdbTree::m_isLoading 2017-03-30 13:51:17 +02:00
772b63283a Code style changes 2017-03-30 13:51:17 +02:00
bfc445762c Fix compilation error 2017-03-29 14:09:00 +02:00
2e9929cd41 Remove statsdb specific code 2017-03-29 12:01:00 +02:00
c53410d2c9 Remove commented out codes 2017-03-29 12:00:13 +02:00
a1ea2bd80b Remove commented out code 2017-03-28 23:28:42 +02:00
17dc6ad663 Remove unused RdbTree::deleteList 2017-03-28 23:28:42 +02:00
7da3b8ad48 Renamed RdbTree::getListSize() to estimateListSize() 2017-03-24 14:34:47 +01:00
d5f8161fb7 Removed RdbTree::setNumKeys()
It was a no-op, and since the key count for collections is set when the tree is loaded it doesn't make sense to call setNumKeys() every time a collection loaded/created. The tree is shared among collections.
2017-03-24 14:00:44 +01:00
c9fd19d754 Removed RdbTree::m_doBalancing
The member was always true so the tree always behaves like an AVL tree.
2017-03-24 13:24:22 +01:00
23df724e29 removed 'dataInPtrs' paramteer to RdbTree::set()
Only TopTree ever set it to true and it only has an effect on save/load which TopTree never does.
2017-03-24 13:10:33 +01:00
0d21817c78 #include cleanup in RdbTree 2017-03-23 17:28:09 +01:00
6a2cf4651d Add constness to RdbTree functions 2017-03-22 12:52:22 +01:00
186b05b14f Remove commented out code 2017-03-22 12:51:21 +01:00
0d5c048fcd Implement verifyIntegrity for RdbTree (calling checkTree) 2017-03-22 12:50:17 +01:00
df4821a785 Make more function in RdbTree private 2017-03-22 11:53:34 +01:00
6126f97ce3 Add constness to function 2017-03-21 16:36:16 +01:00
145c0ddbc5 Remove unused function from RdbTree 2017-03-21 14:19:02 +01:00
ae5004c7f5 Remove unused functions & variable from RdbTree 2017-03-21 12:48:11 +01:00
a14f7bfba5 Avoid calling getMemOccupiedForList2() when fetching less than 2MB
getMemOccupiedForList2() is somewhat expensive so don't call if the minRecSizes are "small"
2017-01-23 16:00:16 +01:00
fc99ee866f Optimize out of double-calls to KEYCMP in RdbTree
compiler is not clever enough to realize that KEYCMP is constexpr / idempotent
2017-01-23 15:10:42 +01:00
8a2b98d5ea Removed unused collnum parameter to RdbMem::dupData() and allocData() 2017-01-17 12:58:01 +01:00
6dd26a3606 Better encapsulation of Collectiondb 2017-01-12 16:49:21 +01:00
8b684c9215 Use Spiderdb instead of g_spiderdb for static functions 2016-11-15 15:13:21 +01:00
14dc0c5fec #include cleanup in RdbTree.* 2016-11-13 15:40:07 +01:00
5af39f1358 Moved MAX_COLL_LEN and MAX_URL_LEN to separate header files
So not most files have to include Collectiondb.h and Url.h
2016-11-12 20:44:42 +01:00
aba937780d Stop #including Conf.h from header files 2016-11-12 20:24:20 +01:00
646014244d Stop using 'shortcut' variables when they makes the code less clear and don't improve performance 2016-11-01 15:40:20 +01:00
bacc239572 #include cleanup of BigFile.h 2016-10-27 13:47:49 +02:00