Revert poorly thought out error squashing. Any error in a transaction kills the transaction anyways.
This commit is contained in:
parent
12de925465
commit
ad0d1bc7e2
|
@ -1,4 +1,4 @@
|
|||
(defproject views "0.4.6"
|
||||
(defproject views "0.4.7"
|
||||
:description "You underestimate the power of the SQL side"
|
||||
|
||||
:url "https://github.com/diligenceengine/views"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
(:require
|
||||
[clojure.string :refer [split]]
|
||||
[clojure.java.jdbc :as j]
|
||||
[clojure.tools.logging :refer [debug]]
|
||||
[clojure.tools.logging :refer [debug error]]
|
||||
[honeysql.core :as hsql]
|
||||
[honeysql.helpers :as hh]
|
||||
[views.db.load :as vdbl]
|
||||
|
@ -219,10 +219,11 @@
|
|||
(try
|
||||
(let [refresh-set (get (vdbl/initial-view db view-sig templates view) view-sig)]
|
||||
(update-in d [view-sig] (update-deltas-with-refresh-set refresh-set)))
|
||||
;; allow serialization errors
|
||||
(catch SQLException e (if (serialization-error? e) (throw e) d))
|
||||
;; ignore any failed view deltas
|
||||
(catch Exception e (log-exception e) d)))
|
||||
;; report bad view-sig on error
|
||||
(catch Exception e
|
||||
(error "error refreshing view" view-sig)
|
||||
(log-exception e)
|
||||
(throw e))))
|
||||
deltas
|
||||
refresh-only-views))
|
||||
|
||||
|
|
|
@ -30,12 +30,7 @@
|
|||
(into [])
|
||||
(post-process-result-set new-view templates)
|
||||
(hash-map new-view))
|
||||
(catch SQLException e
|
||||
(if (serialization-error? e)
|
||||
(throw e)
|
||||
(do
|
||||
(warn "Broken view sig: " (pr-str new-view))
|
||||
(log-exception e))))
|
||||
(catch Exception e
|
||||
(error "when computing initial-view for" new-view)
|
||||
(log-exception e))))
|
||||
(log-exception e)
|
||||
(throw e))))
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(is (= (subscriptions (:persistence config) bsv/default-ns [[:users]])
|
||||
{[:users] #{1}}))
|
||||
;; Verify sends occured.
|
||||
(is (= @sent #{[1 :views.init {[:users] []}]}))))
|
||||
(is (= #{[1 :views.init {[:users] []}]} @sent))))
|
||||
|
||||
;; This test illustrates a slight timing issue. Because view subscriptions
|
||||
;; use threads, an unsubscription that follows a subscription too closely
|
||||
|
|
Loading…
Reference in a new issue