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.
|
11 years ago |
Julian Lam
|
584fe60284
|
fixed #1554, redis error handling will go back to crashing the error (though the error will be logged at least)
|
11 years ago |
Julian Lam
|
b1eb5b175c
|
Merge remote-tracking branch 'origin/master' into groups-pages
Conflicts:
src/topics/tags.js
|
11 years ago |
barisusakli
|
b7fcde446b
|
proper score aggregation #1562
|
11 years ago |
barisusakli
|
7585b72644
|
remove duplicates
|
11 years ago |
barisusakli
|
b32bb76429
|
#1562
|
11 years ago |
Julian Lam
|
7afe3bea59
|
added getSortedSetRevUnion... just because.
|
11 years ago |
Julian Lam
|
6e597a9cdb
|
fixed tests, and added getSortedSetUnion method to redis db, added test for new redis method
|
11 years ago |
barisusakli
|
746df87d89
|
upgrade tags to sorted set
|
11 years ago |
Julian Lam
|
e64c1bfec3
|
closed #1453
|
11 years ago |
Julian Lam
|
bab140c396
|
added pexpire and pexpireAt methods for redis and mongo. Added emoticons for leveldb (as per existing implementation by @psychobunny LOL)
|
11 years ago |
barisusakli
|
5f7ed289de
|
print stack on db error
|
11 years ago |
barisusakli
|
90f5683cc2
|
read redis host just before connecting
|
11 years ago |
barisusakli
|
6a1fa82b8b
|
closes #1402
|
11 years ago |
psychobunny
|
7a823283e4
|
fixed my derp
|
11 years ago |
psychobunny
|
f892a6793a
|
mongo/redis - don't show passwords when typing in CLI
|
11 years ago |
psychobunny
|
268be5f35c
|
fixed LevelDB helpers
|
11 years ago |
psychobunny
|
71d33c0a79
|
fixed mongo helpers
|
11 years ago |
psychobunny
|
8a1f6eb43e
|
forgot to export helpers as well for secondary db
|
11 years ago |
psychobunny
|
290e348851
|
move database helpers into their own files
|
11 years ago |
psychobunny
|
bba3df6802
|
moving db.close into the parent module
|
11 years ago |
psychobunny
|
df5f3d185a
|
don't attempt to initialize db until we attempt to initialize
|
11 years ago |
psychobunny
|
74674c8494
|
Merge remote-tracking branch 'origin/master' into secondary_database
Conflicts:
src/database/level/main.js
|
11 years ago |
psychobunny
|
a7582e2cca
|
organized level helpers ala mongo driver
|
11 years ago |
psychobunny
|
46b6a93e98
|
organizing mongo driver
|
11 years ago |
psychobunny
|
9ad7ce9ca8
|
organizing redis driver
|
11 years ago |
psychobunny
|
e09b156d13
|
removing unnecessary return
|
11 years ago |
psychobunny
|
c86635b4ce
|
making changes for compatibility with 9d405812cb
|
11 years ago |
psychobunny
|
136542f8dd
|
Merge remote-tracking branch 'origin/master' into LevelDB
Conflicts:
tests/database.js
|
11 years ago |
psychobunny
|
f5716de06e
|
forgot to use the passed in fn
|
11 years ago |
psychobunny
|
2acdcd9ba2
|
more cleanup
|
11 years ago |
psychobunny
|
4d65a51ede
|
LevelDB - organization
|
11 years ago |
psychobunny
|
5bac03a37b
|
removed newline
|
11 years ago |
psychobunny
|
cbec5cd3a1
|
cleanup
|
11 years ago |
psychobunny
|
21cb2c384e
|
woo, NodeBB actually works on LevelDB
|
11 years ago |
barisusakli
|
1e3b88a7f0
|
passing array straight to redis
|
11 years ago |
barisusakli
|
9d405812cb
|
changed sortedSetRangeByScore
|
11 years ago |
psychobunny
|
129019777f
|
move work on LevelDB
|
11 years ago |
psychobunny
|
e79284e75f
|
LevelDB init
|
11 years ago |
barisusakli
|
e11efad0b7
|
added getSortedSetRangeByScore
|
11 years ago |
barisusakli
|
7b409c095c
|
mongo callback refactor
|
11 years ago |
barisusakli
|
4f72513f19
|
removed keys
|
11 years ago |
barisusakli
|
6eff7d4c51
|
mongo cleanup
|
11 years ago |
barisusakli
|
76037a5f14
|
closes #1191
added a new method called isSetMembers takes in an array of values to
test if they are members of a set
|
11 years ago |
barisusakli
|
3d68c7c6b6
|
added getObjectsFields methods to db class, changed getUsers methods to use the new method, refactor to user.js and mongo.js
|
11 years ago |
barisusakli
|
71f84655ca
|
minor cleanup
|
11 years ago |
barisusakli
|
57f9f8bc57
|
closes #1176
|
11 years ago |
barisusakli
|
23e1cc010c
|
removed removeHiddenFields function, using mongo selector instead
|
11 years ago |
Baris Soner Usakli
|
d34e68ca25
|
convert score to int in mongo
|
11 years ago |
Baris Soner Usakli
|
da0e1a8eb9
|
added back err to redis flushdb
|
11 years ago |