Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
cc9ca98f
Unverified
Commit
cc9ca98f
authored
10 months ago
by
metabase-bot[bot]
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add cancelation exception for vertica (#42047) (#42090)
Co-authored-by:
lbrdnk
<
lbrdnk@users.noreply.github.com
>
parent
483b22b0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/driver/sql_jdbc/execute.clj
+10
-6
10 additions, 6 deletions
src/metabase/driver/sql_jdbc/execute.clj
with
10 additions
and
6 deletions
src/metabase/driver/sql_jdbc/execute.clj
+
10
−
6
View file @
cc9ca98f
...
...
@@ -713,12 +713,16 @@
;; [[metabase.query-processor.middleware.limit/limit-xform]] middleware, while statment is still
;; in progress. This problem was encountered on Redshift. For details see the issue #39018.
;; It also handles situation where query is canceled through [[qp.pipeline/*canceled-chan*]] (#41448).
(
finally
(
try
(
.cancel
stmt
)
(
catch
SQLFeatureNotSupportedException
_
(
log/warnf
"Statemet's `.cancel` method is not supported by the `%s` driver."
(
name
driver
)))
(
catch
Throwable
_
(
log/warn
"Statement cancelation failed."
)))))))))))
(
finally
;; TODO: Following `when` is in place just to find out if vertica is flaking because of cancelations.
;; It should be removed afterwards!
(
when-not
(
=
:vertica
driver
)
(
try
(
.cancel
stmt
)
(
catch
SQLFeatureNotSupportedException
_
(
log/warnf
"Statemet's `.cancel` method is not supported by the `%s` driver."
(
name
driver
)))
(
catch
Throwable
_
(
log/warn
"Statement cancelation failed."
))))))))))))
(
defn
reducible-query
"Returns a reducible collection of rows as maps from `db` and a given SQL query. This is similar to [[jdbc/reducible-query]] but reuses the
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment