Evgeny Poberezkin
afb212aeca
Merge branch 'master' into ep/journal-mode-wal
2023-11-02 10:25:02 +00:00
Evgeny Poberezkin
4660ee9cff
agent: revert to TVar ( #883 )
2023-11-01 09:15:51 +00:00
Evgeny Poberezkin
b5f733d2db
agent: use IORef for DRG ( #882 )
2023-10-31 23:52:13 +00:00
Evgeny Poberezkin
511d793b92
derive JSON instances with TH ( #869 )
...
* derive JSON instances with TH
* defaultJSON
* remove ToJSON
2023-10-26 09:20:30 +01:00
spaced4ndy
d920a2504b
agent: check confirmed snd queue doesn't exist before replacing ( #871 )
2023-10-25 09:48:54 +04:00
spaced4ndy
55a6157880
agent: change invLocks key type to ByteString
2023-10-24 17:20:39 +04:00
spaced4ndy
73d7f84ee3
agent: take invitation lock on join ( #870 )
2023-10-24 16:55:57 +04:00
Evgeny Poberezkin
cf8b9c12ff
remove test dependencies ( #861 )
...
* remove test dependencies
* .hlint.yaml
2023-10-22 10:50:36 +01:00
Evgeny Poberezkin
9d12d76078
add fourmolu ( #868 )
...
* add fourmolu
* linebreak
* simplify
* comment
2023-10-22 09:20:14 +01:00
spaced4ndy
deb3fc7359
agent: order by internal id when retrieving pending messages ( #867 )
2023-10-19 20:17:12 +04:00
spaced4ndy
1ad69cf74f
agent: always parse connection request uri as simplex:/ ( #863 )
2023-10-16 18:25:56 +04:00
Evgeny Poberezkin
9cb8616d46
get/set SQLite journal mode
2023-10-07 22:46:16 +01:00
Evgeny Poberezkin
cf75d4f5e4
Merge branch 'master' into ep/journal-mode-wal
2023-10-07 21:12:19 +01:00
Alexander Bondarenko
96a38505d6
add FromJSON instances ( #856 )
...
* Add FromJSON instances
* add missing FromJSON instances
* more JSON instances
* update comments
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2023-10-05 15:57:53 +01:00
Evgeny Poberezkin
f097c24e6b
functions to backup/restore/remove store
2023-09-30 17:21:40 +01:00
Evgeny Poberezkin
ad52fdda7a
revert block size change, it is causing corruption in SQLCipher ( sqlcipher/sqlcipher#485 )
2023-09-30 11:46:54 +01:00
Evgeny Poberezkin
ee895a14f5
change block size, checkpoint after vacuum, disable auto-vacuum
2023-09-29 10:08:29 +01:00
Evgeny Poberezkin
5cc8728733
check and change page size when opening connection
2023-09-29 08:25:54 +01:00
Evgeny Poberezkin
459b6d39bf
missing import
2023-09-28 17:41:08 +01:00
Evgeny Poberezkin
053c0b513a
backup wal files
2023-09-28 16:31:34 +01:00
Evgeny Poberezkin
d334a2be79
add toggling WAL mode, doc
2023-09-28 15:54:37 +01:00
Evgeny Poberezkin
3d63e7507c
optionally switch database to delete mode when checkpointing
2023-09-28 14:56:08 +01:00
Evgeny Poberezkin
8e520b17d4
add checkpointSQLiteStore
2023-09-28 14:35:24 +01:00
Evgeny Poberezkin
91df416840
Merge branch 'master' into ep/journal-mode-wal
2023-09-28 13:15:26 +01:00
Evgeny Poberezkin
fda1284ae4
agent: support closing and re-opening store ( #855 )
...
* agent: support closing and re-opening store
* add closed flag, tests
2023-09-27 12:50:24 +01:00
Evgeny Poberezkin
52dc402194
sql: set journal_mode to WAL
2023-09-25 22:49:22 +01:00
Evgeny Poberezkin
887ccbcf6c
Merge branch 'master' into master-ghc9
2023-09-10 18:00:33 +01:00
Evgeny Poberezkin
84ce037867
extend SMP protocol to allow creating new queues without subscriptions ( #839 )
...
* Trace auto-subs flag
* Replace Bools with SubscriptionMode
* Handle SMOnlyCreate
* Wire remaining todos
* Update tests and fix
* Bump protocol level
* Apply suggestions from code review
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
* Scrub needs_sub from agent DB
* Scrub a few more needSubs from the agent api
* change API, fix test
* agent: do not subscribe to queue when creating reply queue
* fix encoding
* WIP: SMOnlyCreate test
* Add SM guard for confirmQueue
Allows the test case to pump the allowConnection
reply without getting PROHIBITED.
* Remove tracing
* add noMessages, remove unnecessary getConnectionMessage from test
* add sending messages to the test
---------
Co-authored-by: IC Rainbow <aenor.realm@gmail.com >
Co-authored-by: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com >
2023-09-10 17:07:19 +01:00
Evgeny Poberezkin
980e5c4d1e
agent: add debugging info ( #840 )
2023-09-04 22:02:12 +01:00
Evgeny Poberezkin
5dc3d739b2
agent: support encrypted local files ( #837 )
...
* agent: support encrypted local files
* migration, update store, api
* tests, fix
* use CF.plain
2023-08-31 22:43:58 +01:00
Evgeny Poberezkin
dc65197cfd
Merge branch 'master' into master-ghc9
2023-08-26 16:54:09 +01:00
Evgeny Poberezkin
4c0b8a31d2
agent: create parent folders when creating the database
2023-08-26 16:53:31 +01:00
Evgeny Poberezkin
ed05428227
Merge branch 'master' into master-ghc9
2023-08-25 14:11:51 +01:00
Evgeny Poberezkin
066d91b0f5
agent: export SubInfo
2023-08-25 09:20:12 +01:00
Evgeny Poberezkin
414b019ad4
agent: function to debug agent subscriptions ( #834 )
...
* agent: function to debug agent subscriptions
* add Show instances
2023-08-24 23:19:48 +01:00
Moritz Angermann
002f36dde0
5.4.0.0: use ghc 9.6.2 ( #791 )
...
* Add 9.6 compat
* compile with GHC9.6.2: dependencies, imports, code
* refactor typeclasses
* refactor record dot
* update cabal version
* update github actions
* update direct-sqlcipher
* 5.4.0.0
* update cabal.project
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com >
2023-08-24 20:22:02 +01:00
Evgeny Poberezkin
d09adb5cd6
agent: wait for db (Revert Revert db error busy treatments ( #796 ) ( #808 )) ( #828 )
...
* Revert "Revert "db error busy treatments (#796 )" (#808 )"
This reverts commit 82aec2cd8f .
* update test
* combine pragmas
2023-08-21 09:06:51 +01:00
Evgeny Poberezkin
b329eb9a86
agent: fix async JOIN ( #827 )
...
* agent: fix async JOIN
* refactor
2023-08-20 18:45:16 +01:00
spaced4ndy
cf2a17b80c
agent: track count and average time for slow queries ( #824 )
2023-08-16 20:14:27 +04:00
spaced4ndy
e586bef57a
agent: add indexes to improve slow queries performance ( #823 )
2023-08-16 10:29:09 +04:00
Evgeny Poberezkin
e2065ab352
agent: track slow SQL queries ( #822 )
...
* agent: track slow SQL queries
* add executeMany
* reduce threshold for slow queries to 50ms
2023-08-12 18:18:10 +01:00
Evgeny Poberezkin
82aec2cd8f
Revert "db error busy treatments ( #796 )" ( #808 )
...
This reverts commit 1afcefa5e7 .
2023-08-09 12:24:03 +01:00
spaced4ndy
e81f3b5529
add indexes ( #809 )
2023-07-22 13:20:49 +01:00
Evgeny Poberezkin
6314bb1706
agent: partially fix message queries, debug message times ( #810 )
...
* agent: partially fix message queries, debug message times
* fix more joins
2023-07-22 13:00:25 +01:00
spaced4ndy
7e2b309450
migration to delete expired messages ( #801 is suspected to have caused temporary traffic increase due to flood of non expired messages) ( #806 )
2023-07-20 16:15:33 +04:00
Evgeny Poberezkin
58cb2855d2
agent: delivery receipts ( #752 )
...
* rfc: delivery receipts
* update doc
* update rfc
* implementation plan, types, schema
* migration, update types
* update types
* rename migration
* export MsgReceiptStatus, JSON encoding
* update rfc, schema
* correction
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
* skeleton of the implementation
* more implementation (some tests fail)
* more code, 1 test fails
* fix encoding
* refactor
* refactor
* test, fix
* only send receipts in v3+, test
* flip condition
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
* flip condition
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
* agent version 4 required to send receipts
* fix test
---------
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com >
2023-07-13 22:33:48 +01:00
spaced4ndy
1afcefa5e7
db error busy treatments ( #796 )
2023-07-11 20:19:20 +04:00
Evgeny Poberezkin
532cd2f39c
fix allFinally
2023-07-09 21:36:23 +01:00
Evgeny Poberezkin
f76a5ca5b6
agent: catch IO errors correctly in MonadError ( #795 )
...
* agent: catch IO errors correctly in MonadError
* correction
* correction
* utils
* agentFinally to catch IO exceptions in ExceptT
* rename
* remove, inline
* rename utils
* utils unit test
* test to show catch and finally problems
* tryAllErrors
* enable all tests
2023-07-09 18:04:45 +01:00
spaced4ndy
f2657f9c0b
add crypto error to RSYNC event ( #794 )
2023-07-05 18:14:51 +04:00