From 211764543f1e0d77d4d99a7343aefb5ac827e9c6 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 7 Dec 2017 21:43:49 +0300 Subject: [PATCH] Update notes for 2017-12-07 --- content/post/2017-12.md | 15 +++++++++++++++ public/2017-12/index.html | 21 ++++++++++++++++++--- public/sitemap.xml | 10 +++++----- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/content/post/2017-12.md b/content/post/2017-12.md index 44acb9496..ac5932d2b 100644 --- a/content/post/2017-12.md +++ b/content/post/2017-12.md @@ -164,3 +164,18 @@ $ grep 124.17.34.60 /home/cgspace.cgiar.org/log/dspace.log.2017-12-07 | grep -o ``` - I've adjusted the nginx IP mapping that I set up last month to account for 124.17.34.60 and 124.17.34.59 using a regex, as it's the same bot on the same subnet +- I was running the DSpace cleanup task manually and it hit an error: + +``` +$ /home/cgspace.cgiar.org/bin/dspace cleanup -v +... +Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle" + Detail: Key (bitstream_id)=(144666) is still referenced from table "bundle". +``` + +- The solution is like I discovered in [2017-04](/cgspace-notes/2017-04), to set the `primary_bitstream_id` to null: + +``` +dspace=# update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (144666); +UPDATE 1 +``` diff --git a/public/2017-12/index.html b/public/2017-12/index.html index 27f184c6b..99fe01758 100644 --- a/public/2017-12/index.html +++ b/public/2017-12/index.html @@ -23,7 +23,7 @@ The list of connections to XMLUI and REST API for today: - + @@ -56,9 +56,9 @@ The list of connections to XMLUI and REST API for today: "@type": "BlogPosting", "headline": "December, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-12/", - "wordCount": "823", + "wordCount": "891", "datePublished": "2017-12-01T13:53:54+03:00", - "dateModified": "2017-12-06T09:51:05+03:00", + "dateModified": "2017-12-07T17:20:45+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -301,8 +301,23 @@ The list of connections to XMLUI and REST API for today: +
$ /home/cgspace.cgiar.org/bin/dspace cleanup -v
+...
+Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle"
+  Detail: Key (bitstream_id)=(144666) is still referenced from table "bundle".
+
+ + + +
dspace=# update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (144666);
+UPDATE 1
+
+ diff --git a/public/sitemap.xml b/public/sitemap.xml index ee7afd25c..6a4412638 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2017-12/ - 2017-12-06T09:51:05+03:00 + 2017-12-07T17:20:45+03:00 @@ -139,7 +139,7 @@ https://alanorth.github.io/cgspace-notes/ - 2017-12-06T09:51:05+03:00 + 2017-12-07T17:20:45+03:00 0 @@ -156,19 +156,19 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2017-12-06T09:51:05+03:00 + 2017-12-07T17:20:45+03:00 0 https://alanorth.github.io/cgspace-notes/post/ - 2017-12-06T09:51:05+03:00 + 2017-12-07T17:20:45+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2017-12-06T09:51:05+03:00 + 2017-12-07T17:20:45+03:00 0