From 61e106fe6a15f76b73125682e91d5c17ee875be2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Jul 2026 12:11:38 +0100 Subject: Include extra details when storing unparsable and uninsertable lines. Now includes the hostnameId, timestamp and optionally error message. Updates idx_entities_retryinsert to account for details not being NULL. Also fixes the issue where the entities inserted and rollback would still be recorded in the entity cache if the access log insert failed. This would have lead to PK violations later on. --- src/sql/unparsableInsert.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/sql/unparsableInsert.sql (limited to 'src/sql/unparsableInsert.sql') diff --git a/src/sql/unparsableInsert.sql b/src/sql/unparsableInsert.sql new file mode 100644 index 0000000..6441f93 --- /dev/null +++ b/src/sql/unparsableInsert.sql @@ -0,0 +1,4 @@ +INSERT INTO entities(type, value, detail) + VALUES ('unparsable_line', $1, jsonb_build_object('hostnameId', $2::int, 'timestamp', CURRENT_TIMESTAMP)) +RETURNING + id -- cgit v1.3