Commit Graph

221 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
e542b27d1d feat: update to mongodb 6.1 (#12087) 2023-10-15 13:38:57 -04:00
Barış Soner Uşaklı
9198a95173 add again 2023-06-15 19:33:41 -04:00
Barış Soner Uşaklı
5db037f1ea chore: up mongo deps (#11375)
* chore: up mongo deps

* mongodb 5.x no more callbacks
2023-03-17 14:36:04 -04:00
Barış Soner Uşaklı
3c60ccfd4d feat: upgrade connect-mongo, closes https://github.com/NodeBB/NodeBB/pull/9367 2021-03-11 13:44:14 -05:00
Peter Jaszkowiak
b9fd2c87f3 chore: bump deps (#9335)
* chore: bump deps

* fix: husky git hooks
2021-02-28 17:54:56 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Barış Soner Uşaklı
1c45fa1ba5 feat: socket.io 3 changes (#8845)
* feat: socket.io 3 changes

* feat: replace socketio-wildcard with socket.onAny

up socket.io-redis to 6.x

* feat: remove mongodb/psql socket.io adapters

* feat: show data on fail

* fix: tests

* fix: typo

* fix: logger test fix

* fix: logger.io_close

* chore: up deps

* chore: update readme to reflect redis requirement

* fix: increase timeout show data if test fails
2020-12-06 13:03:33 -05:00
Barış Soner Uşaklı
202dcef42e fix: #9010, show rest of info even if clusterMonitor priv is not granted 2020-11-30 15:23:37 -05:00
Barış Soner Uşaklı
ce6b20c4b7 feat: remove topics.async.getTopicData usage 2020-07-24 12:02:16 -04:00
Barış Soner Uşaklı
393f19b461 feat: pass connection options to socket.io-adapter-mongo 2020-07-10 08:39:49 -04:00
Barış Soner Uşaklı
7ed1a0140a fix: #8401, #8237
switch to @nodebb/socket.io-adapter-mongo
2020-06-14 22:49:59 -04:00
Barış Soner Uşaklı
4e28e575cf fix: mongo collection stats 2019-10-06 22:08:52 -04:00
Barış Soner Uşaklı
1f0c6f3d60 refactor: async/await mongo 2019-10-03 22:26:33 -04:00
Barış Soner Uşaklı
8d4f20865f fix: redis pubsub not being required correctly
split connection logic into separate module
2019-08-06 18:27:00 -04:00
Barış Soner Uşaklı
186321e646 fix: mongo.close using wrong client 2019-08-06 17:35:03 -04:00
Barış Soner Uşaklı
af1f7249a7 feat: test psql without defineProperty (#7815)
* feat: test psql without defineProperty

* feat: refactor psql

remove .bind calls, use module.pool.query directly
move requires to top of file
move promisify to bottom so .init etc are promisified

* feat: mongodb

move requires to bottom

* feat: redis
2019-08-05 09:20:00 -04:00
Barış Soner Uşaklı
805dcd7ca2 Async refactor in place (#7736)
* feat: allow both callback&and await

* feat: ignore async key

* feat: callbackify and promisify in same file

* Revert "feat: callbackify and promisify in same file"

This reverts commit cea206a9b8.

* feat: no need to store .callbackify

* feat: change getTopics to async

* feat: remove .async

* fix: byScore

* feat: rewrite topics/index and social with async/await

* fix: rewrite topics/data.js

fix issue with async.waterfall, only pass result if its not undefined

* feat: add callbackify to redis/psql

* feat: psql use await

* fix: redis 🌋

* feat: less returns

* feat: more await rewrite

* fix: redis tests

* feat: convert sortedSetAdd

rewrite psql transaction to async/await

* feat: 🐶

* feat: test

* feat: log client and query

* feat: log bind

* feat: more logs

* feat: more logs

* feat: check perform

* feat: dont callbackify transaction

* feat: remove logs

* fix: main functions

* feat: more logs

* fix: increment

* fix: rename

* feat: remove cls

* fix: remove console.log

* feat: add deprecation message to .async usage

* feat: update more dbal methods

* fix: redis :voodoo:

* feat:  fix redis zrem, convert setObject

* feat: upgrade getObject methods

* fix: psql getObjectField

* fix: redis tests

* feat: getObjectKeys

* feat: getObjectValues

* feat: isObjectField

* fix: add missing return

* feat: delObjectField

* feat: incrObjectField

* fix: add missing await

* feat: remove exposed helpers

* feat: list methods

* feat: flush/empty

* feat: delete

* fix: redis delete all

* feat: get/set

* feat: incr/rename

* feat: type

* feat: expire

* feat: setAdd

* feat: setRemove

* feat: isSetMember

* feat: getSetMembers

* feat: setCount, setRemoveRandom

* feat: zcard,zcount

* feat: sortedSetRank

* feat: isSortedSetMember

* feat: zincrby

* feat: sortedSetLex

* feat: processSortedSet

* fix: add mising await

* feat: debug psql

* fix: psql test

* fix: test

* fix: another test

* fix: test fix

* fix: psql tests

* feat: remove logs

* feat: user arrow func

use builtin async promises

* feat: topic bookmarks

* feat: topic.delete

* feat: topic.restore

* feat: topics.purge

* feat: merge

* feat: suggested

* feat: topics/user.js

* feat: topics modules

* feat: topics/follow

* fix: deprecation msg

* feat: fork

* feat: topics/posts

* feat: sorted/recent

* feat: topic/teaser

* feat: topics/tools

* feat: topics/unread

* feat: add back node versions

disable deprecation notice
wrap async controllers in try/catch

* feat: use db directly

* feat: promisify in place

* fix: redis/psql

* feat: deprecation message

logs for psql

* feat: more logs

* feat: more logs

* feat: logs again

* feat: more logs

* fix: call release

* feat: restore travis, remove logs

* fix: loops

* feat: remove .async. usage
2019-07-09 12:46:49 -04:00
Barış Soner Uşaklı
ebfc369ade feat: upgrade to connect-mongo 3.0.0, closes #7693 2019-06-17 08:30:34 -04:00
Barış Soner Uşaklı
fab52b840c fix: prevent crash if results.stats or results.serverStatus is undefined 2019-02-07 16:07:44 -05:00
Barış Soner Uşaklı
26ccd8f626 fix: db info page
if there is no connection to db, connect first
2018-12-10 15:30:10 -05:00
Barış Soner Uşaklı
ed1bf9a16f add more info to advanced db page 2018-11-28 19:24:54 -05:00
Barış Soner Uşaklı
0524fd9caa closes #6996 (#6997)
* closes #6996

* fix lint
2018-11-24 23:02:22 -05:00
Barış Soner Uşaklı
0de60cfdca fix mongodb tests 2018-10-30 18:58:02 -04:00
Barış Soner Uşaklı
8ca36ad122 closes #6890 2018-10-30 18:29:52 -04:00
Barış Soner Uşaklı
c27be9db5a Recent refactor (#6879)
* wip

* fix inf scroll

* remove duplicated code

* remove dupe code in /unread

* use topicList

* update tag page to use topicList

* fix tests

* combine ifs

* remove more dupe code

* disable timeout
2018-10-27 06:26:50 -04:00
Barış Soner Uşaklı
986511e718 try with higher timeout 2018-10-16 21:43:40 -04:00
Barış Soner Uşaklı
0aebb9caf8 closes #6844 2018-10-16 20:27:14 -04:00
Barış Soner Uşaklı
9dbe68a9cb testing again 2018-10-16 19:46:55 -04:00
Barış Soner Uşaklı
18d0deeccb update deprecated methods (#6794) 2018-09-26 15:02:57 -04:00
Barış Soner Uşaklı
0519f84734 Promisify modules (#6723)
* WIP promisify

* promisify psql

* ability to skip some keys

* dont promisify client object

* remove async

* clone entire module so it has all properties

* add shim for node 6

* ignore sessionStore as well

* ignore pool on psql
2018-08-31 11:04:42 -04:00
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.
2018-08-08 15:13:48 -04:00
Barış Soner Uşaklı
8263f81d0c fix pubsub when only mongodb is used 2018-05-25 11:56:40 -04:00
Barış Soner Uşaklı
3b5d6951bb closes #6499 2018-05-10 16:31:16 -04:00
Barış Soner Uşaklı
77d47b31fb cleanly shutdown
wait for webserver to stop accepting connections
destroy current connections
wait for db connection to close
2018-03-22 16:36:23 -04:00
Barış Soner Uşaklı
8a6345ded7 possible fix for pubsub 2018-01-22 16:41:22 -05:00
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
2018-01-18 13:02:56 -05:00
Baris Usakli
5ca3b535e7 closes #6105 2017-11-22 12:19:08 -05:00
Peter Jaszkowiak
e609e497b3 Provide more error information to logs
Provides full stack instead of just message
2017-11-01 18:59:48 -06:00
Barış Soner Uşaklı
7ad4420b6a closes #6000 2017-10-23 15:09:13 -04:00
Baris Usakli
7fe239229d show 3 digits 2017-06-20 16:34:34 -04:00
Peter Jaszkowiak
3c2d4fe649 Switch from underscore to lodash 2017-05-27 14:51:45 -06:00
Barış Soner Uşaklı
fd0043f36a more tests 2017-05-19 20:24:54 -04:00
Barış Soner Uşaklı
54a9e7eab9 #5674 2017-05-12 15:53:07 -04:00
Barış Soner Uşaklı
33f135c091 closes #5675 2017-05-12 15:40:09 -04:00
barisusakli
b91b41dfa3 show database values in gbs 2017-04-22 17:08:54 -04:00
barisusakli
b7b65c7d63 change style 2017-04-22 00:19:23 -04:00
barisusakli
65a65b19c0 tests for #5600 2017-04-16 14:46:02 -04:00
barisusakli
9f8d80e3a4 closes #5600 2017-04-16 14:22:40 -04:00
Peter Jaszkowiak
57696b22f4 Partial fix #5538 2017-03-30 03:17:45 -06:00
Barış Soner Uşaklı
6b0a907ede closes #5552 2017-03-26 15:12:28 +03:00