240 Commits (96cb29aab0cbd79234350723391a5007121e3c28)

Author SHA1 Message Date
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ı 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ı a22a3a9861 fix: log error to prevent headers already sent
retry on uniq index fail
6 years ago
Barış Soner Uşaklı 3917022a48 fix: #7139 7 years ago
Barış Soner Uşaklı fef7e13c9e feat: small fixes 7 years ago
Barış Soner Uşaklı d2c2d56f59 feat: change sortedSetsScore 7 years ago
Barış Soner Uşaklı 00afc5b3ab fix: remove log 7 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
7 years ago
Barış Soner Uşaklı 85a07e999b fix: #7102 7 years ago
Barış Soner Uşaklı 263c918088
feat: remove uid:<uid>:ignored:cids (#7099)
use cid:<cid>:ignorers instead
7 years ago
Baris Usakli e65d40c937 dont return undefined from sortedSetsCard if keys is empty or falsy 7 years ago
Barış Soner Uşaklı ca1e3a758b #6986 7 years ago
Barış Soner Uşaklı 48690a01b9 dont need to call multi if keys.length is 0 7 years ago
Barış Soner Uşaklı f8e219c323 handle empty set, add test 7 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
7 years ago
Barış Soner Uşaklı 7aa937a657 remove dupe code in mongodb sorted 7 years ago
Barış Soner Uşaklı b2b33ffa57 topics data refactor 7 years ago
Barış Soner Uşaklı 26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
7 years ago
Barış Soner Uşaklı 986511e718 try with higher timeout 7 years ago
Barış Soner Uşaklı 1d15dc089b revert isCluster 7 years ago
Barış Soner Uşaklı 154d7076d9 dont pass options 7 years ago
Barış Soner Uşaklı aa567a5f2d print out connString and opts 7 years ago
Barış Soner Uşaklı 2d8d234c57 test mongodb again 7 years ago
Barış Soner Uşaklı e615391b22 convert values to string before removing 7 years ago
Barış Soner Uşaklı 18d0deeccb
update deprecated methods (#6794) 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
Barış Soner Uşaklı fe80186ddf add withscores 7 years ago
Barış Soner Uşaklı 8263f81d0c fix pubsub when only mongodb is used 7 years ago
Barış Soner Uşaklı 3b5d6951bb closes #6499 7 years ago
Barış Soner Uşaklı be5c237388 fix decr/incrObjectField if key in array doesn't exist create it 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 38acedf5bb lint 7 years ago
Baris Usakli 959a742c63 add llen to dbal 7 years ago
Barış Soner Uşaklı bce640e514 closes #6340 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ı 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
Ben Lubar 5b1ed21634 [database/mongo] Improve speed of sortedSetRank (#6229)
* [database/mongo] Improve speed of sortedSetRank

* [database/mongo] Fix sortedSetRank to filter by _key
8 years ago
Barış Soner Uşaklı 5146f43b33 remove console.log 8 years ago
Barış Soner Uşaklı 87d40e9e78 fix increment to use data 8 years ago
Barış Soner Uşaklı cbaa977233 fix type on mongodb if key has expireAt 8 years ago
Barış Soner Uşaklı ea8cf6545c change db.set/get to use data field instead of value 8 years ago
Barış Soner Uşaklı 8e04e86e24 closes #5912 8 years ago
Baris Usakli 30ae0a5499 another process.nextTick 8 years ago
Baris Usakli e187a0def2 fix method name 8 years ago
Baris Usakli 12546cb9ad break up sync operation 8 years ago
Barış Soner Uşaklı 54a84bf130 cache fixes 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ı a73c2628c4 cache improvements, stats 8 years ago