Girish Ramakrishnan
9a2ed4f2c8
apptask: asyncify
2021-09-16 17:25:05 -07:00
Girish Ramakrishnan
bb7eb6d50e
database: remove callback support
2021-09-10 11:40:01 -07:00
Girish Ramakrishnan
51d067cbe3
sysinfo: async'ify
...
in the process, provision, dyndns, mail, dns also got further asyncified
2021-09-02 16:19:46 -07:00
Girish Ramakrishnan
77f5cb183b
merge appdb.js into apps.js
2021-08-23 15:35:38 -07:00
Girish Ramakrishnan
b6f2d6d620
Make database.initialize async
2021-08-23 15:20:14 -07:00
Girish Ramakrishnan
31d742fa67
fix sporadic ETIMEDOUT
...
it seems when docker is busy deleting images, we get a ETIMEDOUT.
the default was 10000.
2021-06-25T22:18:32.324Z box:apps BoxError: connect ETIMEDOUT
at /home/yellowtent/box/src/settingsdb.js:26:36
at Query.queryCallback [as _callback] (/home/yellowtent/box/src/database.js:96:42)
2021-06-25 16:46:49 -07:00
Girish Ramakrishnan
bdbda9b80e
transaction now returns a promise
2021-06-01 16:11:01 -07:00
Girish Ramakrishnan
3a252fe10e
boxerror: override the properties directly
2021-05-11 17:50:40 -07:00
Girish Ramakrishnan
035f356dff
add async support to database.query()
2021-05-02 23:18:07 -07:00
Girish Ramakrishnan
199eda82d1
Use Array.isArray instead
2021-05-02 11:26:47 -07:00
Girish Ramakrishnan
442110a437
lint
2021-05-01 11:21:09 -07:00
Girish Ramakrishnan
7cfc455cd3
make tests pass again
...
also disable column statistics on ubuntu 20
2020-07-10 09:33:35 -07:00
Girish Ramakrishnan
1c96fbb533
Fixes for tests
2020-07-03 13:47:56 -07:00
Girish Ramakrishnan
3dc163c33d
database: rework connection logic
2020-07-03 13:14:00 -07:00
Girish Ramakrishnan
d1ff8e9d6b
Fix crash when mysql crashes
2020-07-02 15:10:05 -07:00
Girish Ramakrishnan
70743bd285
database: Fix event emitter warning
...
the connection object gets reused after release. this means that we keep
attaching the 'error' event and not unlistening.
--trace-warnings can be added to box.service to get the stack trace
2020-07-02 12:00:56 -07:00
Girish Ramakrishnan
aabb9dee13
Fix transaction rollback logic
2020-06-11 09:50:49 -07:00
Girish Ramakrishnan
865a549885
say connected
2020-06-04 11:27:11 -07:00
Girish Ramakrishnan
50dcf827a5
remove console.error use in many places
...
the backtraces just flood the logs
apphealthtask: remove console.error
remove spurious console.dir
cleanup scheduler error logging
2020-06-04 11:21:56 -07:00
Girish Ramakrishnan
aae49f16a2
database: do no reconnect in query
2020-06-04 09:17:58 -07:00
Girish Ramakrishnan
45d5f8c74d
make rollback return an error
...
fixes #690
2020-06-04 09:17:58 -07:00
Girish Ramakrishnan
6cfd64e536
database: do not crash if connection errors
...
Part of #690
2020-06-04 09:17:58 -07:00
Girish Ramakrishnan
c5cc404b3e
do not retry here
...
Part of #690
2020-06-04 09:17:58 -07:00
Girish Ramakrishnan
7a17695ad5
Retry in 10 seconds to not make things worse
...
Part of #690
2020-06-03 16:05:48 -07:00
Girish Ramakrishnan
0e156b9376
migrate permissions and admin flag to user.role
2020-02-21 16:49:20 -08:00
Johannes Zellner
2b6bf8d195
Remove Oauth clients code
2020-02-06 17:26:15 +01:00
Girish Ramakrishnan
e3878fa381
mysqldump: Add --column-statistics=0
...
mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'box' AND TABLE_NAME = 'appAddonConfigs';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)
2020-01-31 18:42:44 -08:00
Girish Ramakrishnan
30eccfb54b
Use BoxError instead of Error in all places
...
This moves everything other than the addon code and some 'done' logic
2019-12-04 11:02:54 -08:00
Girish Ramakrishnan
88454e7d6c
remove unused function
2019-11-07 13:35:37 -08:00
Girish Ramakrishnan
9b74bb73aa
config.js is dead, long live config.js
...
we use settings now
2019-07-26 14:51:51 -07:00
Girish Ramakrishnan
2dda0efe83
Move config.database to db code itself
2019-07-25 16:12:42 -07:00
Girish Ramakrishnan
57c4d96467
ensure mysql is storing UTC times
2019-03-22 15:19:17 -07:00
Johannes Zellner
2181137181
Use docker based mysql server for testing with the correct version
2019-01-23 16:18:52 +01:00
Girish Ramakrishnan
eb566d28e7
Remove groupdb._addDefaultGroups
...
Putting this in db code causes issues when we merge in the
accesscontrol/roles variables (groupdb needs to source those
variables)
2018-06-14 21:56:34 -07:00
Girish Ramakrishnan
d81930be72
add note on conn limit
2018-03-22 21:07:06 -07:00
Girish Ramakrishnan
aac914182f
remove options from database.initialize
2018-03-22 20:34:49 -07:00
Girish Ramakrishnan
f498443cae
remove unused exports
2018-03-22 20:29:26 -07:00
Girish Ramakrishnan
d84d761bad
Remove unused export
2018-03-22 19:40:38 -07:00
Johannes Zellner
3135c227d7
Do not add default domain records when we clear the db for testing
2018-01-26 18:32:01 +01:00
Girish Ramakrishnan
15fbfd3042
create maildb entry in database._clear
2018-01-25 15:20:53 -08:00
Girish Ramakrishnan
ee66893875
more config.fqdn() removal in tests
2018-01-24 14:58:37 -08:00
Girish Ramakrishnan
f4e1b8874c
add maildb entry when domain entry is created
2018-01-21 00:27:28 -08:00
Girish Ramakrishnan
998f736e6f
Add database.exportToFile
2017-11-24 15:29:56 -08:00
Girish Ramakrishnan
b507ccaa33
Add database.importFileFile
...
Part of #439
2017-11-22 23:08:59 -08:00
Johannes Zellner
1ccc3b84b8
Fixup various tests for multidomain
2017-11-20 20:01:50 +01:00
Girish Ramakrishnan
7fde57f7de
clear db ignoring foreign key checks
2016-09-20 14:33:22 -07:00
Johannes Zellner
f3e842ed45
Retry to acquire a db connection when starting a transaction
...
This fixes db issues just like we do for regular queries.
Also we now use the .on('connection') to setup the session and db
this is how the docs recommend it
2016-08-05 15:18:32 +02:00
Girish Ramakrishnan
77457d1ea9
initial mailbox db and model code
2016-05-27 10:36:47 -07:00
Girish Ramakrishnan
3f0e2024e4
pass db name and password for tests
2016-05-13 19:35:20 -07:00
Girish Ramakrishnan
a9d0cf66fd
Add eventlogdb
2016-04-29 23:58:24 -07:00