Skip to content

Commit

Permalink
Fix DB maintenance actions broken by #7117 (#12105)
Browse files Browse the repository at this point in the history
Running some tests I noticed logs like
```
sty 21, 2025 10:12:30 PM org.enso.database.dryrun.OperationSynchronizer runMaintenanceActionIfPossible
SEVERE: A maintenance action failed with exception: As writing is disabled, cannot execute an update query. Press the Write button ▶ to perform the operation.
```

They appear rather randomly. This PR should provide a workaround until #7117 is fixed.
  • Loading branch information
radeusgd authored Jan 22, 2025
1 parent 3587ca2 commit cb7601e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ type JDBC_Connection
`synchronized` critical section (including the current thread).
run_maintenance_action_if_possible : (Nothing -> Any) -> Nothing
run_maintenance_action_if_possible self callback =
self.operation_synchronizer.runMaintenanceActionIfPossible callback
# TODO The wrapping is a workaround for https://github.com/enso-org/enso/issues/7117
wrapped_callback x =
Context.Output.with_enabled <|
callback x
self.operation_synchronizer.runMaintenanceActionIfPossible wrapped_callback

## PRIVATE

Expand Down

0 comments on commit cb7601e

Please sign in to comment.