Hello, Just following up on this now that DSpace 7 is out. I was wondering if anyone has run into this issue in DSpace 7 as well, or if it was fixed, or if they found a solution for 6.x
Updating the Links: [1]: https://jira.lyrasis.org/browse/DS-4001 -> https://github.com/DSpace/DSpace/issues/7348 [2]: https://github.com/DSpace/DSpace/pull/2992 [3]: https://jira.lyrasis.org/browse/DS-3074 -> https://github.com/DSpace/DSpace/pull/1312 or https://github.com/DSpace/DSpace/issues/6430 [4]: https://dspace-org.slack.com/archives/C3V628QNN/p1615944646007700 Thanks again! On Monday, March 22, 2021 at 5:21:58 PM UTC-5 Tom Misilo wrote: > > Hello, > > We recently tried migrating our bitstreams to utilize the S3 storage back > end, and ran into an issue where the database is referencing deleted > bitstreams that don't exist anymore in the asset store. I went and checked > the bitstream uuid that provided the error, and found that it was marked as > deleted, which I found strange since we run "dspace cleanup" on a weekly > basis and figured those would be have been deleted? We have over 70k > bitstreams marked as deleted, so it seems like this hasn't been running for > a long time now, other than deleting the assets but not cleaning up the > database. I ran "dspace cleanup" again and it "ran" without any errors, so > tried to migrate again with no luck. So I ran "dspace cleanup -v", and I > got a list of bitstreams that were being deleted, once it finished I tried > running it again, and I found it odd that the same bitstreams were listed > again. I checked the logs (Since there was no error, contrary to [3]). and > noticed there was Foreign Key Constraint error. Which lead me to find [1], > Which got me halfway there with the query: > > UPDATE bundle SET primary_bitstream_id = NULL FROM bitstream WHERE > bitstream.uuid = bundle.primary_bitstream_id AND bitstream.deleted = true; > > There was also a PR attached [2], that I tried running but still ran into > the same error. I actually came across another FKC: > > " ERROR: update or delete on table "bitstream" violates foreign key > constraint "bundle2bitstream_bitstream_id_fkey" on table > "bundle2bitstream" > Detail: Key (uuid)=(cb5d26a1-e42e-4e25-8081-726ea70b3aaa) is still > referenced from table "bundle2bitstream"." > > And where I am currently struggling with crafting a query similar to the > one above to update the records. Unfortunately, the whole cleanup process > to get a single UUID takes 30-45 minutes per run, so checking each one > individually at this time is not practical. > > Thanks for any help, and feel free to reach out here or on the slack > thread [4], where I had asked originally. > > Tom > > [1]: https://jira.lyrasis.org/browse/DS-4001 > [2]: https://github.com/DSpace/DSpace/pull/2992 > [3]: https://jira.lyrasis.org/browse/DS-3074 > [4]: https://dspace-org.slack.com/archives/C3V628QNN/p1615944646007700 > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/5d65a500-8849-4b61-8578-3e1b1b0a9febn%40googlegroups.com.
