Barış Soner Uşaklı
8ca36ad122
closes #6890
6 years ago
Barış Soner Uşaklı
7aa937a657
remove dupe code in mongodb sorted
6 years ago
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
6 years ago
Baris Usakli
51792da430
dont crash if there is nothing to write
6 years ago
Barış Soner Uşaklı
fb6067a7ca
only parse if field is requested
6 years ago
Baris Usakli
138154a71c
move modules
6 years ago
Barış Soner Uşaklı
b2b33ffa57
topics data refactor
6 years ago
Barış Soner Uşaklı
26d4e0852f
use includes instead of indexOf
...
use _.uniq instead of filter&indexOf
6 years ago
Barış Soner Uşaklı
986511e718
try with higher timeout
6 years ago
Barış Soner Uşaklı
1d15dc089b
revert isCluster
6 years ago
Barış Soner Uşaklı
0aebb9caf8
closes #6844
6 years ago
Barış Soner Uşaklı
154d7076d9
dont pass options
6 years ago
Barış Soner Uşaklı
9dbe68a9cb
testing again
6 years ago
Barış Soner Uşaklı
aa567a5f2d
print out connString and opts
6 years ago
Barış Soner Uşaklı
2d8d234c57
test mongodb again
6 years ago
Barış Soner Uşaklı
e615391b22
convert values to string before removing
6 years ago
Barış Soner Uşaklı
18d0deeccb
update deprecated methods ( #6794 )
7 years ago
Ben Lubar
11b655163e
Only run the DDL for session storage on the primary instance. ( #6788 )
...
This fixes a restart loop caused by deadlocks in large clusters.
7 years ago
Barış Soner Uşaklı
9724ef083e
remove v from query
7 years ago
Barış Soner Uşaklı
786311fa64
use value
7 years ago
Barış Soner Uşaklı
5a69f979a8
update processSortedSet to use withScores
7 years ago
Ben Lubar
97a3079bc0
Optimize PostgreSQL session store.
...
- Sets session ID to be a constant-sized character field inline in the
table instead of a variable-length character field compressed outside
of the row.
- Changes the session data from "json" to "jsonb" which is faster and
smaller on disk with the drawback of not maintaining key order and
whitespace (which we don't care about at all)
- Adds a clustered index on the session expiration timestamp, which will
make periodic session purging much faster.
(For an example, WTDWTF currently has 482355 sessions in the table, and
because there is no index on the expiration timestamp, PostgreSQL must
check all the rows in the table every time.)
This upgrade script can run concurrently with a live NodeBB instance,
but any action that touches sessions will wait until the upgrade script
is done.
Does not touch the database if the database driver is not set to
PostgreSQL or if there is a Redis database configured.
7 years ago
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
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ı
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ı
77d47b31fb
cleanly shutdown
...
wait for webserver to stop accepting connections
destroy current connections
wait for db connection to close
7 years ago
Baris Usakli
3c4b4f5263
don't call calback twice #6375
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ı
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
Julian Lam
457194b333
Merge branch 'master' into develop
7 years ago
Barış Soner Uşaklı
e092778ba6
closes #6200
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
7 years ago
Barış Soner Uşaklı
5146f43b33
remove console.log
7 years ago
Barış Soner Uşaklı
87d40e9e78
fix increment to use data
7 years ago
Barış Soner Uşaklı
cbaa977233
fix type on mongodb if key has expireAt
7 years ago
Barış Soner Uşaklı
ea8cf6545c
change db.set/get to use data field instead of value
7 years ago
Barış Soner Uşaklı
8e04e86e24
closes #5912
7 years ago
Baris Usakli
5ca3b535e7
closes #6105
7 years ago
Baris Usakli
dbf815ed47
closes #6103
7 years ago
Baris Usakli
30ae0a5499
another process.nextTick
7 years ago
Baris Usakli
e187a0def2
fix method name
7 years ago
Baris Usakli
12546cb9ad
break up sync operation
7 years ago
Julian Lam
7e0d0e0eb5
Merge remote-tracking branch 'origin/develop'
7 years ago
Barış Soner Uşaklı
54a84bf130
cache fixes
7 years ago
Barış Soner Uşaklı
43f9c3224f
dont crash sortedSetIncryBy on redis if no callback is supplied
7 years ago
Peter Jaszkowiak
e609e497b3
Provide more error information to logs
...
Provides full stack instead of just message
7 years ago
Barış Soner Uşaklı
a73c2628c4
cache improvements, stats
7 years ago
Barış Soner Uşaklı
e7318a1cea
Mongo cache ( #6002 )
...
* cache mongodb objects
remove user settings cache since it is cached at the object level
* removed indexOf from isMemberOfSets
* change has to get, change maxAge to 0
7 years ago
Barış Soner Uşaklı
7ad4420b6a
closes #6000
7 years ago
Barış Soner Uşaklı
108f84fd19
add type to dbal
7 years ago
Barış Soner Uşaklı
62c81ca0d3
fix lint
8 years ago
Barış Soner Uşaklı
329bfeeb3b
convert min/max to float
8 years ago
Barış Soner Uşaklı
923bd86662
Widgets refactor ( #5817 )
...
* widgets refactor
render widgets server side
widgets can use all the data the template can use
* fix tests
8 years ago
Baris Usakli
e0de922ede
Revert "widgets refactor"
...
This reverts commit 9e94edb5aa
.
8 years ago
Baris Usakli
9e94edb5aa
widgets refactor
...
render widgets server side
widgets can use all the data the template can use
8 years ago
Baris Usakli
d469f53eba
using async in batch
...
removed unused code in debug
8 years ago
Barış Soner Uşaklı
3d85992757
modify db.processSortedSet so it works with intervals
8 years ago
Baris Usakli
7fe239229d
show 3 digits
8 years ago
Peter Jaszkowiak
3c2d4fe649
Switch from underscore to lodash
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ı
fd0043f36a
more tests
8 years ago
Barış Soner Uşaklı
95196ceedc
closes #5692
8 years ago
Barış Soner Uşaklı
54a9e7eab9
#5674
8 years ago
Barış Soner Uşaklı
33f135c091
closes #5675
8 years ago
Julian Lam
ad14b0d60b
more fixes for #5660
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
b91b41dfa3
show database values in gbs
8 years ago
barisusakli
ba51a6c746
fix underscore
8 years ago
barisusakli
b7b65c7d63
change style
8 years ago
barisusakli
a2784738a4
fix lint
8 years ago
barisusakli
2029de4cc5
closes #5449
8 years ago
barisusakli
3d39a577f4
style change
8 years ago
barisusakli
38e16ca8f6
Merge branch 'master' into develop
8 years ago
barisusakli
65a65b19c0
tests for #5600
8 years ago
barisusakli
c3ac7c31b1
Merge branch 'master' into develop
8 years ago
barisusakli
185b6e5c8e
#5600
8 years ago
barisusakli
e3205bcfad
merge
8 years ago
barisusakli
9f8d80e3a4
closes #5600
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
Peter Jaszkowiak
57696b22f4
Partial fix #5538
8 years ago
Barış Soner Uşaklı
6b0a907ede
closes #5552
8 years ago
Julian Lam
b6134b160e
moved auto_reconnect out of socketOptions object for Mongo
8 years ago
barisusakli
5e0de4b8fb
closes #5517
8 years ago
barisusakli
0c7dee05ef
fix lint
8 years ago
barisusakli
92fa9fecb6
add mongodb connection options #3670
...
increase reconnect tries
add keepAlive setting
set autoReconnect to true, should be on by default
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
c18808fdeb
ESlint no-useless-concat, no-mixed-spaces-and-tabs
8 years ago
Peter Jaszkowiak
09e868ce5f
ESlint no-useless-escape, no-else-return
8 years ago
Peter Jaszkowiak
11cb3a9554
ESlint operator-assignment, block-scoped-var
8 years ago
Peter Jaszkowiak
c4bdb72941
ESlint no-unneeded-ternary
...
and no-extend-native, no-sequences
8 years ago
Peter Jaszkowiak
896c8c7343
ESlint object-curly-spacing
8 years ago
Peter Jaszkowiak
1493afee2a
ESlint indent
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
2e031f3759
ESlint comma-spacing
8 years ago
Peter Jaszkowiak
277a7fb8b4
ESlint key-spacing, no-trailing-spaces
8 years ago
Peter Jaszkowiak
b1b486f729
ESlint quote-props
8 years ago
Peter Jaszkowiak
3361a72725
ESlint no-plusplus
...
and no-empty, space-unary-ops
8 years ago
Peter Jaszkowiak
d7526b5e44
ESlint array-bracket-spacing
...
and object-property-newline
8 years ago
Peter Jaszkowiak
1cf25f57fc
ESlint no-space-func
8 years ago
Peter Jaszkowiak
2ba46808a1
ESlint one-var, fix comma-dangle
8 years ago
Peter Jaszkowiak
bc1d70c126
ESlint comma-dangle
8 years ago
Dominic Lennon
3f116e7636
Fixing null ttl issue for MongoSession
8 years ago
Dominic Lennon
b1f0f8fa8b
Adding ttl value to the MongoStore options
8 years ago
Dominic Lennon
a06e39528f
Code review change
8 years ago
Dominic Lennon
ed19454eca
Adding more specific timing for session timings
8 years ago
Dominic Lennon
d248ef95cd
Fix for issue #5334 . SessionStore now uses the correct value
8 years ago
barisusakli
e1253f693a
fix redis union
8 years ago
barisusakli
b71ab64cf4
organize dbal sorted code
8 years ago
Barış Soner Uşaklı
1f52048866
Merge pull request #5252 from Fusselwurm/patch-2
...
ZSET scores are float: parseInt => parseFloat
8 years ago
Moritz Schmidt
c8393d6f87
mongo: set scores as float instead of int
8 years ago
Barış Soner Uşaklı
e0501656b6
parallel startup
8 years ago
Barış Soner Uşaklı
bca6151892
fix lint
8 years ago
Barış Soner Uşaklı
8c8e2ae190
closes #5271
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
1c3d9f7e94
switch to createIndex
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
472dd007d8
fix mongo lex callback
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
437d2744cc
addl lex commands for mongo
8 years ago
yariplus
ef20757f3e
zremrangebylex, zlexcount
8 years ago
barisusakli
1a63672e66
more test fixes
8 years ago
yariplus
1fc5e5d0d3
getSortedSetRevRangeByLex
8 years ago
barisusakli
e462fadd94
init express/webserver for tests
8 years ago
barisusakli
6d97c4cec8
up mongo deps, create session store after db.authenticate
8 years ago
HeeL
4a3c31b2dc
Fix space-before-function-paren linter rule
8 years ago