179 Commits (252dddfc1049d5c7ddebf67c15077ea64dc5889f)

Author SHA1 Message Date
Barış Soner Uşaklı 75816deca7
add cache to redis (#6917)
* add cache to redis

move out cache module from mongo

* fix redis tests

* add callback noop

* fix typo

* del cache on field delete

* make redis/mongo caches separate
7 years ago
Baris Usakli 51792da430 dont crash if there is nothing to write 7 years ago
Ben Lubar 33228bb7fe PostgreSQL database driver (#5861)
* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
7 years ago
Baris Usakli 16a7728ab8 fix redis warnings 7 years ago
Barış Soner Uşaklı 6a9a73c86c changes to leaveAllGroups
Groups.destroy can take an array of groupnames
Groups.leave can take an array of groupnames
db.incrObjectField/decrObjectField can take an array of keys
db.sortedSetRemove can take an array of keys and values
db.setRemove can take an array of keys
7 years ago
Baris Usakli 959a742c63 add llen to dbal 7 years ago
Barış Soner Uşaklı 7a2d6fe22d Merge remote-tracking branch 'refs/remotes/origin/master' into develop 7 years ago
Barış Soner Uşaklı b084a596fa closes #6301 7 years ago
Barış Soner Uşaklı c0b7d4f5b5 fix redis export 8 years ago
Barış Soner Uşaklı 8a6345ded7 possible fix for pubsub 8 years ago
Ben Lubar e85aabbe74 Allow running as a cluster without Redis (#6233)
* [database/*] Allow databases other than Redis to provide pubsub for clustering if Redis is not present

* [pubsub] Delay messages sent before the database is ready until the database is ready.

* [pubsub] Restore old behavior of not using the database in non-clustered NodeBB instances.

See comment: https://github.com/NodeBB/NodeBB/pull/6233#issuecomment-357814968
8 years ago
Baris Usakli dbf815ed47 closes #6103 8 years ago
Barış Soner Uşaklı 43f9c3224f dont crash sortedSetIncryBy on redis if no callback is supplied 8 years ago
Barış Soner Uşaklı 108f84fd19 add type to dbal 8 years ago
Barış Soner Uşaklı 890c2eff70 style changes 8 years ago
Barış Soner Uşaklı fe0a5aaf28 fix redis tests 8 years ago
Barış Soner Uşaklı 95196ceedc closes #5692 8 years ago
Barış Soner Uşaklı 7135d25a4a closes #5654 8 years ago
Barış Soner Uşaklı 14f3907aa4 change the way group member posts are stored 8 years ago
barisusakli 92343eb2e1 fix mongo setObject if key/value is empty string 8 years ago
barisusakli 7ce6c1d0ad closes #5571 8 years ago
Peter Jaszkowiak 1ed571189c Make utils and translator easier to require
Move utils.walk to file.walk, backwards compatible
8 years ago
barisusakli 6aa8c8aa94 merge 8 years ago
barisusakli fa08498a9e closes #5480 8 years ago
Peter Jaszkowiak 4bb49a7171 ESlint no-unused-vars 8 years ago
Peter Jaszkowiak 09e868ce5f ESlint no-useless-escape, no-else-return 8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks 8 years ago
Peter Jaszkowiak feb8405f95 ESlint eol-last 8 years ago
Peter Jaszkowiak a038c66549 ESlint quotes 8 years ago
Peter Jaszkowiak 604358ecc4 ESlint keyword-spacing, no-multi-spaces 8 years ago
Peter Jaszkowiak 3361a72725 ESlint no-plusplus
and no-empty, space-unary-ops
8 years ago
Peter Jaszkowiak 2ba46808a1 ESlint one-var, fix comma-dangle 8 years ago
barisusakli e1253f693a fix redis union 9 years ago
barisusakli b71ab64cf4 organize dbal sorted code 9 years ago
Moritz Schmidt e8e33a8a23 ZSET scores are float: parseInt => parseFloat
In Redis, scores of sorted sets can be floats – so we should use `parseFloat` instead of `parseInt` when converting from string to number.
Should not lead to #4939 again, as `new Date()` works regardless of whether it's being passed a float or integer.
9 years ago
barisusakli 5d6e2ad083 multiple test fixes 9 years ago
barisusakli c8b5c181ff fix flag on redis
check if number is returned on tests
9 years ago
Barış Soner Uşaklı c512a02c83 Merge pull request #5124 from yariplus/lexistuff
Add additional lexical dbal operations.
9 years ago
yariplus af2122bdb9 fix lex tests maybe 9 years ago
barisusakli 4a0f67afdc search tests
new method emptydb
use emptydb instead of flushdb, flushdb  removes indices for mongo which
breaks search tests
initialize meta.config properly in tests
enable nodebb-plugin-dbsearch for tests
9 years ago
yariplus be3b35dea3 fix callbacks and regex 9 years ago
yariplus 1bb44e2429 Allow lex min and max to be inclusive or exclusive. 9 years ago
yariplus ef20757f3e zremrangebylex, zlexcount 9 years ago
yariplus 1fc5e5d0d3 getSortedSetRevRangeByLex 9 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
HeeL 3fa1c1f927 Fix space-infix-ops linter rule 9 years ago
barisusakli 0d09fcbee7 fix setAdd on redis for empty arrays 9 years ago
barisusakli 990ecc8cd2 sortedSetIntersectionCard 9 years ago
barisusakli e1263f1057 sortedSetUnionCard 9 years ago
barisusakli eabb745116 change union to match intersect
accept aggregate and withscores
9 years ago
barisusakli 3d56776ab0 fix tabs 9 years ago
barisusakli 6022fd984a closes #4945 9 years ago
barisusakli c8a369f5c3 closes #4939 9 years ago
barisusakli 018f7ba65a closes #4307
ability to send an array of keys to getSortedSetRange
use getSortedSetRevRange instead of getSortedSetRevUnion
9 years ago
barisusakli dcbf53bae3 moved search to dbsearch 10 years ago
barisusakli aa577f4adc part 1
no upgrade script yet
10 years ago
barisusakli 7b550b13b9 display both redis/mongo info if available 10 years ago
Barış Soner Uşaklı ba1afdf879 dont crash if callback isnt supplied fixes #3033 10 years ago
barisusakli fa9fde43fb closes #2971 10 years ago
barisusakli e2196af8ab part 2 of search changes 10 years ago
barisusakli c7128bcc98 part 1 of search change 10 years ago
barisusakli ec8fc8b97b dont do anything if id is falsy
added callback
10 years ago
psychobunny b0628c2df8 missing semi-colons in database/ 10 years ago
barisusakli 3bcd8aefb0 deleteObjectFields method
cleaned up user reset
10 years ago
Barış Soner Uşaklı 749ce5f8e5 dont crash if callback isnt supplied to list methods 10 years ago
barisusakli 39cac43b96 if key isn't found dont error
Conflicts:
	src/database/redis/main.js
11 years ago
barisusakli bd8a77a22b dont crash if callback isnt passed in 11 years ago
barisusakli 2c45dc6450 redis helpers 11 years ago
barisusakli c379753341 upgrade scripts
upgrade groups to sorted set(groups:createtime) upgrade
upgrade groups:<name>:members to sorted set
new database methods
tests
11 years ago
barisusakli 96c27d29f4 dont crash if callback isn't supplied 11 years ago
Julian Lam eb5b8ccec3 better check for group exist, groups with different cases can no longer be created, #2588 11 years ago
barisusakli f67053df52 figure out pathname, dont crash if callback isnt supplied 11 years ago
barisusakli 4d5ed784a1 more hash tests
getObjectValues
isObjectField
deleteObjectField
incrObjectField
11 years ago
barisusakli 3e8c29e5f9 list tests 11 years ago
barisusakli 1cbf5ddfe9 only send back err on redis.deleteAll 11 years ago
barisusakli 7cf3719c80 fix rename and increment 11 years ago
barisusakli bf54859a27 key tests 11 years ago
barisusakli 37235557bb fix callback in redis.setRemove 11 years ago
barisusakli 00fb3ab909 only send back error for sortedSetsRemove 11 years ago
barisusakli cd41e192d1 closes #2546 11 years ago
barisusakli 2f8e6a1f2b closes #2458 11 years ago
barisusakli 671ec8532c fix unfavourite 11 years ago
barisusakli 1d2d69fa45 use helpers, redis crash fix 11 years ago
barisusakli 0a44d3f5e0 moved updateCategoryField out, db.delete only sends back err 11 years ago
barisusakli 1fe82ee452 added 2 new methods to dbal
getSortedSetRangeWithScores
getSortedSetRangeByScoreWithScores
11 years ago
barisusakli 740c336480 typo 11 years ago
barisusakli dba20160ce check length 11 years ago
barisusakli 212e15b2c2 fixin redis zrevrangebyscore to return value score 11 years ago
barisusakli 5fc760c6c4 unread changes 11 years ago
barisusakli 9d25772b53 added sortedSetIncrBy 11 years ago
barisusakli c5c97c784a optimize getPostIndices
only use 1 set when its in a topic
11 years ago
barisusakli b1f492dec3 fix redis bulk zadd 11 years ago
barisusakli 4b80bbb9c4 optimized user.delete 11 years ago
barisusakli 31eccb8e7f configurable post delay before first post 11 years ago
barisusakli 35a903f9c8 closes #2074
when new notifications are pushed to uids clear their old notifications.
11 years ago
barisusakli 493d0dea1e part 1 of notif refactor 11 years ago
barisusakli 01f983e29c markAsRead improvement
takes in an array of tids instead of marking topics read 1 by 1
same for the category.markAsRead function
11 years ago
barisusakli 5222edb624 sortedSetsAdd
using mullti/bulk for redis/mongo
lets you add a score/value pair to multiple sorted sets at once
11 years ago
barisusakli 2252ab7479 notifications.prune
run every hour
dont get more than 500 notifications
11 years ago