Toucan2 uses a derive-based hook system rather than explicit method implementations. You declare behavior by deriving your model from special hook keywords.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unstaged | |
modified src/metabase/lib/metadata/calculation.cljc | |
@@ -22,7 +22,8 @@ | |
[metabase.util.i18n :as i18n] | |
[metabase.util.log :as log] | |
[metabase.util.malli :as mu] | |
- [metabase.util.malli.registry :as mr])) | |
+ [metabase.util.malli.registry :as mr] | |
+ [malli.error :as me])) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"database_id": 13371337, | |
"parameterized": false, | |
"started_at": "2025-08-19T22:24:07.03818Z", | |
"via": [ | |
{ | |
"status": "failed", | |
"class": "class org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException", | |
"error": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(order by `source`.`running_time_seconds`) AS `Percentile 90 of query running ti' at line 2", | |
"stacktrace": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"database_id": 13371337, | |
"parameterized": false, | |
"started_at": "2025-08-19T22:22:59.101199Z", | |
"via": [ | |
{ | |
"status": "failed", | |
"class": "class org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException", | |
"error": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(order by `source`.`running_time_seconds`) AS `Percentile 90`, PERCENTILE_CONT(0' at line 2", | |
"stacktrace": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/escherize/e5a0266b8efc7b4ae311762f775a3bfb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"database_id": 13371337, | |
"parameterized": true, | |
"started_at": "2025-08-19T18:23:49.389733Z", | |
"via": [ | |
{ | |
"status": "failed", | |
"class": "class org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException", | |
"error": "Unknown column 'source.max' in 'order clause'", | |
"stacktrace": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-08-19 18:13:31,761 ERROR middleware.catch-exceptions :: Error processing query: Unknown column 'source.max' in 'order clause' | |
{:database_id 13371337, | |
:parameterized true, | |
:started_at #t "2025-08-19T18:13:20.097556Z[UTC]", | |
:via | |
[{:status :failed, | |
:class org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException, | |
:error "Unknown column 'source.max' in 'order clause'", | |
:stacktrace | |
["org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(MariaDbSqlException.java:34)" |
Investigated suspected memory leak in metabase.util.malli.registry/cache
atom. Initial reports suggested unbounded memory growth during test runs.
The real issue wasn't a memory leak, but fundamentally broken caching for function schemas. With the original schema-cache-key implementation, schemas containing function objects generated unstable cache keys because:
(fn [x] ...)
creates new function objects each time
Function objects have different identity even with identical code
This caused cache misses for functionally identical schemas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns mage.escherize.analyze-cache-misses | |
(:require | |
[clojure.edn :as edn] | |
[clojure.java.io :as io] | |
[clojure.string :as str] | |
[mage.util :as util])) | |
(defn read-log [log-file] | |
(map second (edn/read-string (str "[" (slurp log-file) "]")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/escherize/24e99c1ad6bd6bab2971d520093c2470 |
NewerOlder