From 957c975b9b00a4eb4b7f69b086bca18937c4fb05 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Mon, 19 Feb 2018 22:05:53 +0100 Subject: [PATCH] Improve summary reporting of errors. Not all error paths are counted correctly at this point, this commit improves the situation in passing. A thorough review should probably be planned sometime. --- src/pg-copy/copy-rows-in-stream.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pg-copy/copy-rows-in-stream.lisp b/src/pg-copy/copy-rows-in-stream.lisp index f5f6a9b..bbe9eb2 100644 --- a/src/pg-copy/copy-rows-in-stream.lisp +++ b/src/pg-copy/copy-rows-in-stream.lisp @@ -55,7 +55,9 @@ ;; stop at any failure here, this function doesn't implement any kind ;; of retry behaviour. (log-message :error "~a" c) - (pomo:execute "ROLLBACK"))) + (update-stats :data table :errs 1) + (pomo:execute "ROLLBACK") + (return-from stream-rows-to-copy seconds))) ;; return seconds spent sending data to PostgreSQL (update-stats :data table :rows rcount :bytes bytes)