<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hello,</p>
<p>Has anyone else experienced problems with the API generating so
many events that it causes records to be unviewable?</p>
<p>We need to move ~3000 archival objects from one resource to
another, and then into their correct places as children of other
archival objects already in the destination resource. That worked
fine while testing, doing a few calls to the <a moz-do-not-send="true" href="https://archivesspace.github.io/archivesspace/api/#transfer-components-from-one-resource-to-another">component_transfers</a>
and <a moz-do-not-send="true" href="https://archivesspace.github.io/archivesspace/api/#move-existing-archival-objects-to-become-children-of-an-archival-object">accept_children</a>
methods at the time. But when run as a script on a clone of our
production system, making ~6000 API calls caused both the source
and destination resources to display gateway errors in the staff
interface (Java heap space errors in the logs). My first reaction
was to do a <a moz-do-not-send="true" href="http://archivesspace.github.io/archivesspace/user/re-creating-indexes/#Full-reindex">full
re-index</a>. But that didn't fix it, in fact it made it worse,
because all the moved archival objects disappeared from the Solr
index (but the indexer didn't log any errors), meaning they
disappeared from the public user interface (no individual pages
and not included in the collection organization view, although
they were listed in the tree structure in the sidebar.)<br>
</p>
<p>The problem appears to be that the component_transfers method
creates an event record each time it successfully transfers an
archival object between two resources. Each of those event objects
are linked to both the source and destination resources, as well
as to the individual archival object moved. Having ~3000 events
linked to a single resource seems to be too many for the staff
interface to display. And somehow they must also interrupt
indexing.<br>
</p>
<p>I was able to fix it by deleting the events via their own API
endpoint. But that adds an extra step, to read the
component_transfers responses to get the event IDs, and then send
another ~3000 requests to delete them. Does anyone know if it is
possible to prevent the events being created in the first place?</p>
<p>Thanks,</p>
<p>Andrew.</p>
<p><br>
</p>
</body>
</html>