psychobunny
7327730252
LTRIM support for redis
2014-07-28 14:20:24 -04:00
barisusakli
3829019bfa
removed optional params
2014-07-24 23:33:33 -04:00
barisusakli
8dce99250b
final fix for #1884
...
fix mongo functions so they return correct data if duplicate keys are
passed. getObjects(['post:1', 'post:1'], callback) was only returning
one object.
2014-07-24 12:41:22 -04:00
barisusakli
a3fecee781
removed console.log err check
2014-07-22 13:00:04 -04:00
barisusakli
89bb11a58c
closes #1880
2014-07-22 12:56:34 -04:00
barisusakli
d00740703b
use the new $text query from mongo 2.6
2014-07-21 14:18:42 -04:00
barisusakli
9d7a8fcc0b
getSortedSetRevRangeWithScores
2014-07-09 13:45:33 -04:00
barisusakli
b5df5c0a91
closes #1562 , level session
2014-07-09 13:26:39 -04:00
barisusakli
53d68be7c0
level sortedSetsRemove
2014-07-09 12:57:04 -04:00
barisusakli
37b73e1c02
cleaner mongo setRemoveRandom
2014-07-04 23:36:40 -04:00
barisusakli
38494a2af0
pass in session directly
2014-07-02 16:13:26 -04:00
barisusakli
24ebf20d7e
first commit
2014-07-02 16:13:25 -04:00
barisusakli
9aacb5e259
remove dupe code
2014-06-29 14:10:20 -04:00
barisusakli
c3a9767bf6
late night optimizations
...
-isMemberOfSets returns true/false instead of 1/0
-when loading the posts of a topic only get the userdata for each user
once, before this commit if a topic had 10 posts from 2 different users
we were getting the user data for each user 5 times (drunk)
-getVoteStatusByPostIDs and getFavouritesByPostIDs no longer make
pids.length calls to the db, they use isMemberOfSets now
-getUserInfoForPost renamed to getUserInfoForPosts and doesnt make
uids.length calls to db, uses getMultipleUserFields instead
2014-06-28 01:03:26 -04:00
barisusakli
d3fc71529a
callback
2014-06-27 23:23:27 -04:00
barisusakli
f80b3c3b66
simpler union
2014-06-25 18:27:22 -04:00
barisusakli
7f534cc7b8
sorted set refactor
2014-06-25 18:16:42 -04:00
barisusakli
e6d8e9c959
searchIndex callbacks
2014-06-24 09:15:44 -04:00
barisusakli
fd12ec763a
sortedSetsRemove
...
instead of calling sortedSetRemove() one at a time for each id remove
value from multiple sortedSets with one db call
2014-06-21 22:37:46 -04:00
Charles
90b2d766f7
Fix callback execution in redis search
...
`callback` should be passed to `reds.search` otherwise the execution will be overlapped.
For example in the plugin `nodebb-plugin-dbsearch':
```javascript
db.searchRemove('topic', tid, function() {
if (typeof title === 'string' && title.length) {
db.searchIndex('topic', title, tid);
}
if (typeof callback === 'function') {
callback();
}
});
```
The actual execution is like this
```
1402387863.625553 [0 127.0.0.1:16660] "zrevrangebyscore" "nodebbtopicsearch:object:6" "+inf" "0"
1402387863.625891 [0 127.0.0.1:16660] "MULTI"
1402387863.626043 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:123" "1" "6"
1402387863.626052 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "123"
1402387863.626060 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:TST" "1" "6"
1402387863.626065 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "TST"
1402387863.626071 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:AN0" "1" "6"
1402387863.626076 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "AN0"
1402387863.626083 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:TPK" "1" "6"
1402387863.626092 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "TPK"
1402387863.626104 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:ETTT" "1" "6"
1402387863.626116 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "ETTT"
1402387863.626130 [0 127.0.0.1:16660] "EXEC"
1402387863.626253 [0 127.0.0.1:16660] "del" "topic:6:tags"
1402387863.626281 [0 127.0.0.1:16660] "MULTI"
1402387863.626515 [0 127.0.0.1:16660] "del" "nodebbtopicsearch:object:6"
1402387863.626524 [0 127.0.0.1:16660] "EXEC"
```
The key nodebbtopicsearch:object is added and then just being deleted again.
2014-06-10 15:30:53 +07:00
Julian Lam
584fe60284
fixed #1554 , redis error handling will go back to crashing the error (though the error will be logged at least)
2014-05-28 20:40:40 -04:00
Julian Lam
b1eb5b175c
Merge remote-tracking branch 'origin/master' into groups-pages
...
Conflicts:
src/topics/tags.js
2014-05-24 12:38:16 -04:00
barisusakli
b7fcde446b
proper score aggregation #1562
2014-05-23 17:03:53 -04:00
barisusakli
7585b72644
remove duplicates
2014-05-23 15:36:54 -04:00
barisusakli
b32bb76429
#1562
2014-05-23 14:30:59 -04:00
Julian Lam
7afe3bea59
added getSortedSetRevUnion... just because.
2014-05-23 09:49:18 -04:00
Julian Lam
6e597a9cdb
fixed tests, and added getSortedSetUnion method to redis db, added test for new redis method
2014-05-23 09:49:18 -04:00
barisusakli
746df87d89
upgrade tags to sorted set
2014-05-22 13:06:19 -04:00
Julian Lam
e64c1bfec3
closed #1453
2014-05-11 11:45:20 -04:00
Julian Lam
bab140c396
added pexpire and pexpireAt methods for redis and mongo. Added emoticons for leveldb (as per existing implementation by @psychobunny LOL)
2014-05-11 10:31:32 -04:00
barisusakli
5f7ed289de
print stack on db error
2014-04-28 18:55:09 -04:00
barisusakli
90f5683cc2
read redis host just before connecting
2014-04-22 01:39:57 -04:00
barisusakli
6a1fa82b8b
closes #1402
2014-04-18 13:14:38 -04:00
psychobunny
7a823283e4
fixed my derp
2014-04-15 12:02:36 -04:00
psychobunny
f892a6793a
mongo/redis - don't show passwords when typing in CLI
2014-04-14 20:33:08 -04:00
psychobunny
268be5f35c
fixed LevelDB helpers
2014-04-14 17:14:09 -04:00
psychobunny
71d33c0a79
fixed mongo helpers
2014-04-14 17:09:03 -04:00
psychobunny
8a1f6eb43e
forgot to export helpers as well for secondary db
2014-04-14 15:15:21 -04:00
psychobunny
290e348851
move database helpers into their own files
2014-04-14 15:09:57 -04:00
psychobunny
bba3df6802
moving db.close into the parent module
2014-04-14 13:51:45 -04:00
psychobunny
df5f3d185a
don't attempt to initialize db until we attempt to initialize
2014-04-14 13:41:33 -04:00
psychobunny
74674c8494
Merge remote-tracking branch 'origin/master' into secondary_database
...
Conflicts:
src/database/level/main.js
2014-04-14 11:43:54 -04:00
psychobunny
a7582e2cca
organized level helpers ala mongo driver
2014-04-11 15:47:49 -04:00
psychobunny
46b6a93e98
organizing mongo driver
2014-04-11 15:44:53 -04:00
psychobunny
9ad7ce9ca8
organizing redis driver
2014-04-11 15:29:01 -04:00
psychobunny
e09b156d13
removing unnecessary return
2014-04-11 15:25:20 -04:00
psychobunny
c86635b4ce
making changes for compatibility with 9d405812cb
2014-04-11 02:32:43 -04:00
psychobunny
136542f8dd
Merge remote-tracking branch 'origin/master' into LevelDB
...
Conflicts:
tests/database.js
2014-04-11 02:27:15 -04:00
psychobunny
f5716de06e
forgot to use the passed in fn
2014-04-11 02:24:11 -04:00
psychobunny
2acdcd9ba2
more cleanup
2014-04-11 02:13:08 -04:00