86 Commits (a395324b52a921b9e58cac11cb1237db48b2cb03)

Author SHA1 Message Date
Timothy Fike 5078a8df25
ttl/pttl (#8689) 4 years ago
Barış Soner Uşaklı 9389749b79 feat: sorted set lex test 4 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ı 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ı 0009f54e6e feat: add getSortedSetMembers 5 years ago
Barış Soner Uşaklı 3b6d57e497 refactor: move code 5 years ago
Barış Soner Uşaklı 4ee3543ea4 feat: tweak intersection code, add tests 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ı edf9fe3b7f feat: add null tests for sorted sets 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ı b602c04463 feat: refactor getSortedSetRange to allow big arrays 5 years ago
Baris Usakli 1e5246f9ad feat: add new test 5 years ago
Barış Soner Uşaklı 1e0190abef fix: #7842, groups.invite works with an array of uids 6 years ago
Barış Soner Uşaklı 53e1b349ae
Change post owner (#7752)
* feat: #7749, allow array of keys for setObject

* feat: sortedSetRemoveBulk

* feat: test for bulk remove

* feat: #7083, ability to change post ownership

* feat: #7083, fix tid:<tid>:posters

* feat: #7083, front end

* fix: #7752, psql methods

* fix: add missing await

* fix: maybe psql
6 years ago
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 cea206a9b8e6d8295310074b18cc82a504487862.

* 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
6 years ago
Barış Soner Uşaklı bd640a1107
Topic await errors (#7727)
* feat: derp await

* feat: restore user.getSettings

* feat: cleanup

* feat: make tid const

* feat: cleanup

* fix: tests

* feat: deprecate filter:controllers.topic.get

* feat: rewrite post-index logic

* feat: change calculation to match others

* fix: use .async

* feat: remove try/catch wrapper
6 years ago
Barış Soner Uşaklı 3ecd703ea3 feat: #7707, added sortedSetAddBulk 6 years ago
Barış Soner Uşaklı a39f0ef592 fix: #5570, create per category user post zsets 6 years ago
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ı 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ı 3917022a48 fix: #7139 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ı 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 76af8caf58 add missing semicolon 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
Barış Soner Uşaklı ca1e3a758b #6986 6 years ago
Barış Soner Uşaklı f8e219c323 handle empty set, add test 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
Barış Soner Uşaklı 7aa937a657 remove dupe code in mongodb sorted 6 years ago
Barış Soner Uşaklı f3a679e268 remove parseInts 6 years ago
Barış Soner Uşaklı c738dc7d3e remove some more parseInts 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) 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
Barış Soner Uşaklı c3fc4a06bf test sortedSetUnion with scores 7 years ago
Barış Soner Uşaklı fde44cb9b9 pass array to groups.destroy
pass array to db.sortedSetRemove
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
Barış Soner Uşaklı 7221b71b68 add test for srem with multi elements 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