643 Commits (3696a1997074ef0bee91f3966edb2b0a9a3c7c79)

Author SHA1 Message Date
Barış Soner Uşaklı 78896fc623 fix: redis check compat tests 4 years ago
Barış Soner Uşaklı fdfbc90255 feat: async/await redis connection 4 years ago
Barış Soner Uşaklı 33bf1b0e2c feat: async/await psql connection 4 years ago
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
4 years ago
Barış Soner Uşaklı 202dcef42e fix: #9010, show rest of info even if clusterMonitor priv is not granted 4 years ago
Barış Soner Uşaklı b8cafefce2 fix: winston usages 4 years ago
Barış Soner Uşaklı 5bb5ec4618
fix: #8954, clear purged replies and toPids (#8959)
* fix: #8954, clear purged replies and toPids

* fix: redis test
4 years ago
Barış Soner Uşaklı f1f9b225b0
feat: #8824, cache refactor (#8851)
* feat: #8824, cache refactor

ability to disable caches
ability to download contents of cache
refactor cache modules to remove duplicated code

* fix: remove duplicate hit/miss tracking

check cacheEnabled in getUncachedKeys
4 years ago
Barış Soner Uşaklı a338f52780 feat: #8823, remove hardcoded write concern 4 years ago
Barış Soner Uşaklı a05905f196
performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
4 years ago
Barış Soner Uşaklı b2ff1594b8 fix: redis hget
'node_redis: The HGET command contains a invalid argument type.\n' +
'Only strings, dates and buffers are accepted. Please update your code to use valid argument types.'
4 years ago
Timothy Fike 5078a8df25
ttl/pttl (#8689) 4 years ago
Barış Soner Uşaklı 4be693f2e7
feat: fullname search (#8641)
* feat: fullname search

* fix: take last element

* fix: attempt to fix psql like query

* feat: upgrade sript, another fix attempt

* fix: psql test

* fix: psql scan

* feat: add debug for test

* feat: test collate

* feat: cleanup

* fix: upgrade script
5 years ago
Barış Soner Uşaklı 2d5bd153e0 fix: check if unread_tids are followed 5 years ago
Barış Soner Uşaklı 896fe9d65e fix: don't crash on outdated redis instances 5 years ago
Barış Soner Uşaklı ce6b20c4b7 feat: remove topics.async.getTopicData usage 5 years ago
Barış Soner Uşaklı 393f19b461 feat: pass connection options to socket.io-adapter-mongo 5 years ago
Barış Soner Uşaklı c2ca02dfc7 fix: #8474
make isPrimary and isCluster always booleans
they were strings when using ./nodebb start and boolean if they were in config.json and started with node app.js
5 years ago
Barış Soner Uşaklı 87dd6c83eb fix: tests 5 years ago
Barış Soner Uşaklı 746222d6c6 fix: handle scan/zscan returning duplicate elements on redis
increase count on redis zscan
5 years ago
Barış Soner Uşaklı 057b783df7 feat: use covered query 5 years ago
Barış Soner Uşaklı e95cd28f6f
Zscan (#8458)
* feat: zscan

* fix: mongodb tests

* feat: scan, ip search starts with
5 years ago
Barış Soner Uşaklı 723fe8e8e0
feat: zscan (#8457)
* feat: zscan

* fix: mongodb tests
5 years ago
Barış Soner Uşaklı e80379dc0e feat: display stack trace on winston.error 5 years ago
Barış Soner Uşaklı bef37e27cb
fix: test lock for user create (#8415)
* fix: test lock for user create

* fix: redis hdel with undefined

* feat: add test for undefined key in deleteObjectFields
5 years ago
Barış Soner Uşaklı 7ed1a0140a fix: #8401, #8237
switch to @nodebb/socket.io-adapter-mongo
5 years ago
Barış Soner Uşaklı 2c9e865763 fix: retry failed setObject calls 5 years ago
Barış Soner Uşaklı 0009f54e6e feat: add getSortedSetMembers 5 years ago
Barış Soner Uşaklı 1b9e8928eb feat: use getSortedSetsMembers to load followed tids 5 years ago
Barış Soner Uşaklı a015af4a41 feat: add batch size to cursors 5 years ago
Barış Soner Uşaklı 9600ede579
feat: up cache size 5 years ago
Barış Soner Uşaklı 3ec05eeaf8 fix: user faster method if sorting by smallest set 5 years ago
Barış Soner Uşaklı 4ee3543ea4 feat: tweak intersection code, add tests 5 years ago
Barış Soner Uşaklı e5228179c1
Mongo intersection (#8322)
* feat: intersection without aggregation

* feat: intersection

* feat: remove debug code
5 years ago
Barış Soner Uşaklı 12c6bc2e07 feat: convert queries so they used indices directly 5 years ago
Barış Soner Uşaklı 7a801abade fix: tests on redis 5 years ago
Barış Soner Uşaklı 2587112f9d feat: if only one value is passed used faster function 5 years ago
Barış Soner Uşaklı edf9fe3b7f feat: add null tests for sorted sets 5 years ago
Julian Lam ccc6118d30
Testing suite integration for openapi spec (#8263)
* feat: testing suite integration for openapi spec

The testing suite now takes the openapi spec into account. It will
check each route defined, make a call to it, and compare the
response with the defined schema. Any mismatches will cause the
test to fail.

* fix(openapi): removed debug stuff from tests

* fix(openapi): fixed some tests

* fix(openapi): added additional check to tests, test fixes

* fix(openapi): better tests, fixed spec errors

* fix(openapi): bad conditional in test

* fix: oops

* fix(openapi): more tests fixing

* fix(openapi): more tests

* fix(openapi): fix some more tests

* fix: verbose'd an info log

* fix: topic pagination route returns schema-optimized pagination block

* fix(openapi): more test/spec fixes

* fix(openapi): accidentally sending in authenticated jar for anon routes

* fix(openapi): more test/spec fixes

* fix(openapi): more spec fixes

* fix: timestampReadable Invalid Date

* fix(openapi): more tests... almost there

* fix(openapi): more tests fixing

* fix(openapi): finally all tests passing

* fix(openapi): added reverse test to compare response to spec

... and fixed all the tests that broke

* fix: remove tests related to group covers, as route is gone

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): broken test on travis

* fix(openapi): object cache is not present for psql

* fix: tests

Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
5 years ago
Peter Jaszkowiak e68156e1f2
fix(deps): bump dependencies (#8239)
* fix(deps): bump dependencies

* fix(deps): commander@5

* fix(deps): use @nodebb/mubsub
5 years ago
Opliko 41c20761e1
Remove deprecated mongo connection options, fixes #8079 (#8174)
fix #8079 
Unified Topology changes the concept of connecting and causes isConnected to always return true, making any reconnection options useless. Next major version of the driver will remove isConnected entirely.
So:
- reconnect tries
- reconnectInterval
- autoReconnect

Are deprecated and don't really do anything anymore (when unified topology is used at least) other than causing warnings at startup since the 3.4 version of the driver (the current version used by NodeBB is 3.5).

Reference: http://mongodb.github.io/node-mongodb-native/3.5/reference/unified-topology/
5 years ago
Ben Lubar f65922297d fix abysmal postgresql performance in getSortedSetsMembers (#8030)
* refactor postgres upgrade function to use async

* add function wrapper for getting the elements of a sorted set to avoid postgres planning the query with a nested sequential scan

* fix fatal(?!) lint errors

* add missing await

* bump PostgreSQL version on Travis CI to one that isn't over 3 years out of date
5 years ago
Barış Soner Uşaklı b01a47cbc1 feat: log errors from mubsub 5 years ago
Barış Soner Uşaklı 4e28e575cf fix: mongo collection stats 5 years ago
Barış Soner Uşaklı 02d38caf47 refactor: async/await 5 years ago
Barış Soner Uşaklı 1f0c6f3d60 refactor: async/await mongo 5 years ago
Barış Soner Uşaklı 310c6fd33f
properly filter /unread /recent /popular /top (#7927)
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs

* fix: add new test

* feat: make sortedSetRangeByScore work with keys on redis

* fix: hardcoded set name

* feat: show topics from readable categories on recent/popular/top

* feat: rewrite unread topics

respect watched categories and followed topics

* fix: term + watched
5 years ago
Barış Soner Uşaklı 22b02f1407
feat: add failing test for pagination (#7924)
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs
5 years ago
Barış Soner Uşaklı 572bc29742 refactor: shorter map 5 years ago
Barış Soner Uşaklı 039710493a refactor: remove logs 5 years ago