Skip to content
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

DeadLockReport on rollbacktoawaitingdeletion/DbUpdater.scala:48 #1664

Closed
sentry-dev-app bot opened this issue Aug 17, 2023 · 0 comments · Fixed by #1682
Closed

DeadLockReport on rollbacktoawaitingdeletion/DbUpdater.scala:48 #1664

sentry-dev-app bot opened this issue Aug 17, 2023 · 0 comments · Fixed by #1682

Comments

@sentry-dev-app
Copy link

Not a long time ago we did a bit of work cleaning up the transaction management/rollback for various EVENT_STATUS_CHANGE events. In this particular case, for instance, all got properly rolled back but we still raise this error (and log it) while actually is probably just a noise and false positive scenario. Probably we should catch it and do no more than an INFO message if at all.

Sentry Issue: RENKU-GRAPH-EA

PostgresErrorException: 
🔥  
🔥  Postgres ERROR 40P01 raised in DeadLockReport (deadlock.c:1146)
🔥  
🔥    Problem: �[36mDeadlock detected.�[0m
🔥     Detail: �[36mProcess 1735360 waits for ShareLock on transaction 3113045; blocked�[0m
🔥  �[36m           by process 1735392.
🔥  Process 1735392 waits for ShareLock on�[0m
🔥  �[36m           transaction 3113061; blocked by process 1735360.�[0m
🔥       Hint: �[36mSee server log for query details.�[0m
🔥  
🔥  The statement under consideration was defined
🔥    at /work/event-log/src/main/scala/io/renku/eventlog/events/consumers/statuschange/rollbacktoawaitingdeletion/DbUpdater.scala:48
🔥  
🔥    �[32mUPDATE event evt�[0m
🔥    �[32m              SET status = ($1), execution_date = ($2)�[0m
🔥    �[32m              WHERE project_id = ($3) AND status = ($4)�[0m
🔥  
🔥  and the arguments were provided
🔥    at /work/graph-commons/src/main/scala/io/renku/db/SqlStatement.scala:94
🔥  
🔥    $1 varchar    �[32mAWAITING_DELETION�[0m
🔥    $2 timestamptz �[32m2023-08-16 18:47:49.095273Z AD�[0m
🔥    $3 int4       �[32m5653�[0m
🔥    $4 varchar    �[32mDELETING�[0m
🔥  
🔥  If this is an error you wish to trap and handle in your application, you can do
🔥  so with a SqlState extractor. For example:
🔥  
🔥    �[32mdoSomething.recoverWith { case SqlState.DeadlockDetected(ex) =>  ...}�[0m
🔥  

skunk.exception.PostgresErrorException: Deadlock detected.
    at skunk.net.protocol.Execute$$anon$1$$anonfun$$nestedInanonfun$apply$2$1.$anonfun$applyOrElse$8(Execute.scala:69)
    at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
    at flatMap @ skunk.net.BufferedMessageSocket$$anon$1.$anonfun$receive$1(BufferedMessageSocket.scala:150)
    at get @ skunk.util.Pool$.free$1(Pool.scala:156)
    at flatMap @ skunk.net.BufferedMessageSocket$$anon$1.receive(BufferedMessageSocket.scala:147)

Scheduled process failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
0 participants