198 Commits (36895421ba0f8ceae21efbaa324ac8da4794602a)

Author SHA1 Message Date
Baris Usakli 31ccc860d3 feat: allow multiple scores in sortedSetsAdd 6 years ago
Barış Soner Uşaklı 2c98dd5f9d
Object cache refactor (#7558)
* fix: cache refactor

db.getObjectField no longer loads entire object
db.getObjectsFields only clones data once
more tests

* feat: add back cache to redis

db.getObjectField no longer loads entire object
6 years ago
Barış Soner Uşaklı 4df925e76a fix: remove redis object cache 6 years ago
Baris Usakli 45d7e37ae8 fix: tests 6 years ago
Baris Usakli b48b6d75e5 fix: callbacks 6 years ago
Baris Usakli 7addc5a0e2 fix: return early if keys is empty 6 years ago
Baris Usakli b3962c1694 fix: return early if keys is empty 6 years ago
Barış Soner Uşaklı 5917dec288
fix: only allow numbers as scores (#7356)
* zadd score checks

* fix: only allow numbers as scores

* fix: convert values to strings
6 years ago
Barış Soner Uşaklı fef7e13c9e feat: small fixes 6 years ago
Barış Soner Uşaklı eb7ae54f81
Category watch state (#7109)
* feat: wip, category watch change

* feat: pass data to client

* feat: allow changing state

* fix: account page categories

* fix: show in unread if topic is followed or category is watched

* feat: add default watch state to acp

* feat: save user category watch state

* feat: update unread recent pages

* fix: remove dupe code

* fix: flip conditions

* fix: handle empty arrays

* fix: ignore/watch on others profile

* feat: upgrade script for category states

if there are any users ignoring categories set their state in new zset and delete cid:<cid>:ignorers

* fix: upgrade

* fix: tests

* fix: redis count

* fix: more tests
6 years ago
Barış Soner Uşaklı d117df77f7 fix: #7102 6 years ago
Barış Soner Uşaklı 263c918088
feat: remove uid:<uid>:ignored:cids (#7099)
use cid:<cid>:ignorers instead
6 years ago
Baris Usakli e65d40c937 dont return undefined from sortedSetsCard if keys is empty or falsy 6 years ago
Baris Usakli 420227faae parseFloat scores 6 years ago
Barış Soner Uşaklı 53ad2bbd6e
Categories optimize (#6999)
* WIP

* fix category page

* fix counts, and copyPrivileges

* fix lint

* more fixes,

* redis fix

* fix test

* fix  category test

* remove getParentsAndChildren
6 years ago
Baris Usakli 7b9a2caec3 closes #6994 6 years ago
Barış Soner Uşaklı ca1e3a758b #6986 6 years ago
Barış Soner Uşaklı 48690a01b9 dont need to call multi if keys.length is 0 6 years ago
Barış Soner Uşaklı 07f83c5078 fix redis tests 6 years ago
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
6 years ago
Baris Usakli 51792da430 dont crash if there is nothing to write 6 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 7 years ago
Barış Soner Uşaklı 8a6345ded7 possible fix for pubsub 7 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
7 years ago
Baris Usakli dbf815ed47 closes #6103 7 years ago
Barış Soner Uşaklı 43f9c3224f dont crash sortedSetIncryBy on redis if no callback is supplied 7 years ago
Barış Soner Uşaklı 108f84fd19 add type to dbal 7 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 8 years ago
barisusakli b71ab64cf4 organize dbal sorted code 8 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.
8 years ago
barisusakli 5d6e2ad083 multiple test fixes 8 years ago
barisusakli c8b5c181ff fix flag on redis
check if number is returned on tests
8 years ago
Barış Soner Uşaklı c512a02c83 Merge pull request #5124 from yariplus/lexistuff
Add additional lexical dbal operations.
8 years ago
yariplus af2122bdb9 fix lex tests maybe 8 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
8 years ago
yariplus be3b35dea3 fix callbacks and regex 8 years ago
yariplus 1bb44e2429 Allow lex min and max to be inclusive or exclusive. 8 years ago
yariplus ef20757f3e zremrangebylex, zlexcount 8 years ago
yariplus 1fc5e5d0d3 getSortedSetRevRangeByLex 8 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 8 years ago
HeeL 3fa1c1f927 Fix space-infix-ops linter rule 8 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 9 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
10 years ago
barisusakli bd8a77a22b dont crash if callback isnt passed in 10 years ago
barisusakli 2c45dc6450 redis helpers 10 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
10 years ago
barisusakli 96c27d29f4 dont crash if callback isn't supplied 10 years ago
Julian Lam eb5b8ccec3 better check for group exist, groups with different cases can no longer be created, #2588 10 years ago
barisusakli f67053df52 figure out pathname, dont crash if callback isnt supplied 10 years ago
barisusakli 4d5ed784a1 more hash tests
getObjectValues
isObjectField
deleteObjectField
incrObjectField
10 years ago
barisusakli 3e8c29e5f9 list tests 10 years ago
barisusakli 1cbf5ddfe9 only send back err on redis.deleteAll 10 years ago
barisusakli 7cf3719c80 fix rename and increment 10 years ago
barisusakli bf54859a27 key tests 10 years ago
barisusakli 37235557bb fix callback in redis.setRemove 10 years ago
barisusakli 00fb3ab909 only send back error for sortedSetsRemove 10 years ago
barisusakli cd41e192d1 closes #2546 10 years ago