Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Better error handling when sync-tracking-atoms fails (#64132)

Nathan Voxland3f15dcd0ad03
diff --git a/src/metabase/search/appdb/index.clj b/src/metabase/search/appdb/index.clj
index ac558c65771..b8d39fdecd8 100644
--- a/src/metabase/search/appdb/index.clj
+++ b/src/metabase/search/appdb/index.clj
@@ -255,8 +255,12 @@
(if (table-not-found-exception? e)
;; If resetting tracking atoms resolves the issue (which is likely happened because of stale tracking data),
;; suppress the issue - but throw it all the way to the caller if the issue persists
- (do (sync-tracking-atoms!)
- (specialization/batch-upsert! table-name entries))
+ (try
+ (sync-tracking-atoms!)
+ (specialization/batch-upsert! table-name entries)
+ (catch Exception e2
+ (log/error e2 "Error syncing index tracking atoms after table not found exception")
+ (throw e)))
(throw e))))))
(defn- batch-update!