From 33061dbe3a4077c7da045b4d6bb506cc264bd118 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 24 Aug 2023 09:03:46 +0300 Subject: [PATCH] Add notes for 2023-08-23 --- content/posts/2023-08.md | 30 +++++++++++++++++++ docs/2023-08/index.html | 39 +++++++++++++++++++++++-- docs/categories/index.html | 2 +- docs/categories/notes/index.html | 2 +- docs/categories/notes/page/2/index.html | 2 +- docs/categories/notes/page/3/index.html | 2 +- docs/categories/notes/page/4/index.html | 2 +- docs/categories/notes/page/5/index.html | 2 +- docs/categories/notes/page/6/index.html | 2 +- docs/categories/notes/page/7/index.html | 2 +- docs/categories/notes/page/8/index.html | 2 +- docs/index.html | 2 +- docs/page/10/index.html | 2 +- docs/page/2/index.html | 2 +- docs/page/3/index.html | 2 +- docs/page/4/index.html | 2 +- docs/page/5/index.html | 2 +- docs/page/6/index.html | 2 +- docs/page/7/index.html | 2 +- docs/page/8/index.html | 2 +- docs/page/9/index.html | 2 +- docs/posts/index.html | 2 +- docs/posts/page/10/index.html | 2 +- docs/posts/page/2/index.html | 2 +- docs/posts/page/3/index.html | 2 +- docs/posts/page/4/index.html | 2 +- docs/posts/page/5/index.html | 2 +- docs/posts/page/6/index.html | 2 +- docs/posts/page/7/index.html | 2 +- docs/posts/page/8/index.html | 2 +- docs/posts/page/9/index.html | 2 +- docs/sitemap.xml | 10 +++---- 32 files changed, 100 insertions(+), 37 deletions(-) diff --git a/content/posts/2023-08.md b/content/posts/2023-08.md index d26ab76c5..1566e6219 100644 --- a/content/posts/2023-08.md +++ b/content/posts/2023-08.md @@ -172,5 +172,35 @@ $ ./run.sh -s http://localhost:8081/solr/statistics -a import -o /tmp/statistics - This time looking at the thumbnail responses in item endpoints - According to [the documentation](https://github.com/DSpace/RestContract/blob/main/items.md#main-thumbnail) the API will respond with HTTP 200 if there is a thumbnail, and HTTP 204 if there is no content - That means we need to make the request before we can even find out! +- Tim on DSpace Slack pointed out the DSpace 7 REST API's [projections](https://github.com/DSpace/RestContract/blob/main/projections.md) + - This means we can embed resources like thumbnail and owningCollection in the item (and other) requests, for example: https://dspace7test.ilri.org/server/api/discover/search/objects?dsoType=item&embed=thumbnail,owningCollection + +## 2023-08-23 + +- I benchmarked the DSpace 7 REST API with the new embeds and it took four hours and seventeen minutes to get all 106,000 items on DSpace 7 Test + - So this is much slower than the results I saw earlier this week, but maybe slightly faster than DSpace 6? +- Maria from Alliance contacted me to say they have agreed to use UN M.49 regions more strictly in TIP, so they want to replace our non-standard "Latin America" region with "Latin America and the Caribbean", "Caribbean" and "Americas" on all Alliance outputs + - I exported their community on CGSpace and fixed the metadata in OpenRefine +- I tried to run `dspace cleanup -v` on CGSpace, but got this error: + +``` +Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle" + Detail: Key (uuid)=(61bff7da-c8e3-420f-841c-ec5e8238d716) is still referenced from table "bundle". +``` + +- The solution, as always, is to delete those IDs manually in PostgreSQL: + +``` +$ psql -d dspace -c "UPDATE bundle SET primary_bitstream_id=NULL WHERE primary_bitstream_id IN ('61bff7da-c8e3-420f-841c-ec5e8238d716');" +UPDATE 1 +``` + +- I also tried to delete all users who haven't logged in since 2017 using the groomer script, but it crashes due to those users still having items or workflows or whatever: + +```console +$ dspace dsrun org.dspace.eperson.Groomer -a -b 08/23/2017 -d +``` + +- I see that it is now [possible in DSpace 7 to delete such users](https://github.com/DSpace/DSpace/pull/2229) so we will have to wait diff --git a/docs/2023-08/index.html b/docs/2023-08/index.html index 094994529..c51530ae0 100644 --- a/docs/2023-08/index.html +++ b/docs/2023-08/index.html @@ -19,7 +19,7 @@ Start working on some batch uploads for IFPRI - + @@ -44,9 +44,9 @@ Start working on some batch uploads for IFPRI "@type": "BlogPosting", "headline": "August, 2023", "url": "https://alanorth.github.io/cgspace-notes/2023-08/", - "wordCount": "1254", + "wordCount": "1514", "datePublished": "2023-08-03T11:18:36+03:00", - "dateModified": "2023-08-18T23:54:07+03:00", + "dateModified": "2023-08-22T17:28:49+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -322,6 +322,39 @@ Start working on some batch uploads for IFPRI
  • That means we need to make the request before we can even find out!
  • +
  • Tim on DSpace Slack pointed out the DSpace 7 REST API’s projections + +
  • + +

    2023-08-23

    + +
    Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle"
    +  Detail: Key (uuid)=(61bff7da-c8e3-420f-841c-ec5e8238d716) is still referenced from table "bundle".
    +
    +
    $ psql -d dspace -c "UPDATE bundle SET primary_bitstream_id=NULL WHERE primary_bitstream_id IN ('61bff7da-c8e3-420f-841c-ec5e8238d716');"
    +UPDATE 1
    +
    +
    $ dspace dsrun org.dspace.eperson.Groomer -a -b 08/23/2017 -d
    +
    diff --git a/docs/categories/index.html b/docs/categories/index.html index 50e3ab22a..533414d65 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/index.html b/docs/categories/notes/index.html index acdb502f6..0ed58520c 100644 --- a/docs/categories/notes/index.html +++ b/docs/categories/notes/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/2/index.html b/docs/categories/notes/page/2/index.html index 804b0c433..962651551 100644 --- a/docs/categories/notes/page/2/index.html +++ b/docs/categories/notes/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/3/index.html b/docs/categories/notes/page/3/index.html index a118bc6e9..9653b3a9c 100644 --- a/docs/categories/notes/page/3/index.html +++ b/docs/categories/notes/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/4/index.html b/docs/categories/notes/page/4/index.html index 534348cf4..151a77c0b 100644 --- a/docs/categories/notes/page/4/index.html +++ b/docs/categories/notes/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/5/index.html b/docs/categories/notes/page/5/index.html index 0fda278ed..d7dd51dbc 100644 --- a/docs/categories/notes/page/5/index.html +++ b/docs/categories/notes/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/6/index.html b/docs/categories/notes/page/6/index.html index 1d836679d..8144fe3d5 100644 --- a/docs/categories/notes/page/6/index.html +++ b/docs/categories/notes/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/7/index.html b/docs/categories/notes/page/7/index.html index 0ebdd58f7..9974f2cc9 100644 --- a/docs/categories/notes/page/7/index.html +++ b/docs/categories/notes/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/8/index.html b/docs/categories/notes/page/8/index.html index d38af4afc..bb17d15da 100644 --- a/docs/categories/notes/page/8/index.html +++ b/docs/categories/notes/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/index.html b/docs/index.html index 6dbb5239b..e35d076e3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/10/index.html b/docs/page/10/index.html index 4f58dc7fd..ee00808d7 100644 --- a/docs/page/10/index.html +++ b/docs/page/10/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/2/index.html b/docs/page/2/index.html index 3f79cca61..d5f5d16d0 100644 --- a/docs/page/2/index.html +++ b/docs/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/3/index.html b/docs/page/3/index.html index 84b6ea817..1e186c3e7 100644 --- a/docs/page/3/index.html +++ b/docs/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/4/index.html b/docs/page/4/index.html index 6c8dc1df7..70facc22d 100644 --- a/docs/page/4/index.html +++ b/docs/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/5/index.html b/docs/page/5/index.html index c6a12ca13..0a73cb429 100644 --- a/docs/page/5/index.html +++ b/docs/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/6/index.html b/docs/page/6/index.html index 39dab5763..57b863481 100644 --- a/docs/page/6/index.html +++ b/docs/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/7/index.html b/docs/page/7/index.html index 5f0ba3462..2fa4702c9 100644 --- a/docs/page/7/index.html +++ b/docs/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/8/index.html b/docs/page/8/index.html index e19c78018..6c1b48b84 100644 --- a/docs/page/8/index.html +++ b/docs/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/9/index.html b/docs/page/9/index.html index 45a0cbd7e..2b22c5924 100644 --- a/docs/page/9/index.html +++ b/docs/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/index.html b/docs/posts/index.html index de8fc3beb..89fc5b144 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/10/index.html b/docs/posts/page/10/index.html index 72bf77911..15976e401 100644 --- a/docs/posts/page/10/index.html +++ b/docs/posts/page/10/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/2/index.html b/docs/posts/page/2/index.html index a0021cfeb..80c0b7159 100644 --- a/docs/posts/page/2/index.html +++ b/docs/posts/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/3/index.html b/docs/posts/page/3/index.html index 2b54b74b9..4a3f1119b 100644 --- a/docs/posts/page/3/index.html +++ b/docs/posts/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/4/index.html b/docs/posts/page/4/index.html index b94a785c1..debb7fb8b 100644 --- a/docs/posts/page/4/index.html +++ b/docs/posts/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/5/index.html b/docs/posts/page/5/index.html index a633b1d2d..aa398fb5d 100644 --- a/docs/posts/page/5/index.html +++ b/docs/posts/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/6/index.html b/docs/posts/page/6/index.html index 90360b4cf..cdcb04271 100644 --- a/docs/posts/page/6/index.html +++ b/docs/posts/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/7/index.html b/docs/posts/page/7/index.html index 070922fc4..b566eafe3 100644 --- a/docs/posts/page/7/index.html +++ b/docs/posts/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/8/index.html b/docs/posts/page/8/index.html index 9b578a962..a78311c7b 100644 --- a/docs/posts/page/8/index.html +++ b/docs/posts/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/9/index.html b/docs/posts/page/9/index.html index 6cd199739..1feaf3bf9 100644 --- a/docs/posts/page/9/index.html +++ b/docs/posts/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index cfcbddc6f..c93f13ad7 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -3,19 +3,19 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml"> https://alanorth.github.io/cgspace-notes/2023-08/ - 2023-08-18T23:54:07+03:00 + 2023-08-22T17:28:49+03:00 https://alanorth.github.io/cgspace-notes/categories/ - 2023-08-18T23:54:07+03:00 + 2023-08-22T17:28:49+03:00 https://alanorth.github.io/cgspace-notes/ - 2023-08-18T23:54:07+03:00 + 2023-08-22T17:28:49+03:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2023-08-18T23:54:07+03:00 + 2023-08-22T17:28:49+03:00 https://alanorth.github.io/cgspace-notes/posts/ - 2023-08-18T23:54:07+03:00 + 2023-08-22T17:28:49+03:00 https://alanorth.github.io/cgspace-notes/2023-07/ 2023-08-02T23:04:11+03:00