Repository navigation
agent: prevent switch leftovers and waits for the notification queue #2095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
dbb9f26
e930913
7632a07
76079ee
39a30e1
259167a
284a4d7
de387b6
1b3798d
277c0f4
b97a8b3
5658cbd
a411c28
a33da6b
2a06cc1
425d53c
158f566
de68382
8d86e19
99cb1c6
33c9bbf
4b38cca
128d856
d44ca73
81dfcdd
8aa2ed0
1efa2fb
cd3f7a7
9a33fd4
f620a6b
de119c4
b4e3329
f8890ac
36d3207
4c2ee39
953dac4
f0bdba6
c9ae815
c55ef71
2eb02bb
9c6121e
3398bac
4a42ac9
2989063
9b08382
6826cf6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -299,7 +299,7 @@ jobs: | |
| chmod -fR 777 ~/.cabal ./dist-client-postgres || :; git config --global --add safe.directory '*' | ||
| scripts/ci/prune-old-builds.sh dist-client-postgres | ||
| cabal update | ||
| cabal build --builddir=dist-client-postgres --jobs=$(nproc) --enable-tests -fserver_postgres -fclient_postgres -fslow_servers ${{ env.ghc_options }} simplexmq-test | ||
| cabal build --builddir=dist-client-postgres --jobs=$(nproc) --enable-tests -fserver_postgres -fclient_postgres -fslow_servers -fconn_lock_checks ${{ env.ghc_options }} simplexmq-test | ||
| mkdir -p /out | ||
| bin=$(find /project/dist-client-postgres -name simplexmq-test -type f -executable) | ||
| cp "$bin" /out/simplexmq-test-client-postgres | ||
|
|
@@ -503,7 +503,7 @@ jobs: | |
| run: | | ||
| scripts/ci/prune-old-builds.sh dist-newstyle dist-postgres dist-client-postgres | ||
| if [ "${{ matrix.client_postgres }}" = true ]; then | ||
| cabal build --builddir=dist-client-postgres --jobs=$(nproc) --enable-tests -fserver_postgres -fclient_postgres -fslow_servers --ghc-options=-O0 simplexmq-test | ||
| cabal build --builddir=dist-client-postgres --jobs=$(nproc) --enable-tests -fserver_postgres -fclient_postgres -fslow_servers -fconn_lock_checks --ghc-options=-O0 simplexmq-test | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same flags as L302, so that the -O0 cache of master and stable pushes matches pull request builds. |
||
| else | ||
| cabal build --builddir=dist-postgres --jobs=$(nproc) --enable-tests -fserver_postgres --ghc-options=-O0 | ||
| cabal build --jobs=$(nproc) --ghc-options=-O0 | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,6 +94,11 @@ flag slow_servers | |
| manual: True | ||
| default: False | ||
|
|
||
| flag conn_lock_checks | ||
| description: Fail agent server requests made inside a connection lock, for tests. | ||
| manual: True | ||
| default: False | ||
|
|
||
|
Comment on lines
+97
to
+101
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| flag server_postgres | ||
| description: Build server with support of PostgreSQL. | ||
| manual: True | ||
|
|
@@ -429,6 +434,8 @@ library | |
| cpp-options: -DswiftJSON | ||
| if flag(slow_servers) | ||
| cpp-options: -Dslow_servers | ||
| if flag(conn_lock_checks) | ||
| cpp-options: -Dconn_lock_checks | ||
| if !flag(client_library) | ||
| build-depends: | ||
| case-insensitive ==1.2.* | ||
|
|
@@ -683,6 +690,8 @@ test-suite simplexmq-test | |
| cpp-options: -DdbServerPostgres | ||
| if flag(slow_servers) | ||
| cpp-options: -Dslow_servers | ||
| if flag(conn_lock_checks) | ||
| cpp-options: -Dconn_lock_checks | ||
| if flag(client_postgres) | ||
| cpp-options: -DdbPostgres | ||
| else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -682,7 +682,7 @@ deleteSndFileRemote c userId sndFileEntityId sfd = deleteSndFilesRemote c userId | |
|
|
||
| deleteSndFilesRemote :: AgentClient -> UserId -> [(SndFileId, ValidFileDescription 'FSender)] -> AM' () | ||
| deleteSndFilesRemote c userId sndFileIdsDescrs = do | ||
| deleteSndFilesInternal c (map fst sndFileIdsDescrs) `E.catchAny` (notify c "" . SFERR . INTERNAL . show) | ||
| deleteSndFilesInternal c (map fst sndFileIdsDescrs) `E.catchAny` (notifySub' c "" . SFERR . INTERNAL . show) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Written without waiting for subQ space: called in the API thread of xftpDeleteSndFilesRemote (rule 4); no test. |
||
| let rs = concatMap (mapMaybe chunkReplica . fdChunks . snd) sndFileIdsDescrs | ||
| void $ withStoreBatch' c (\db -> map (uncurry $ createDeletedSndChunkReplica db userId) rs) | ||
| let servers = S.fromList $ map (\(FileChunkReplica {server}, _) -> server) rs | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PostgreSQL agent store tests are built with
conn_lock_checks, also in the reduced build (L554).