Re: [Dspace-tech] Item ID and handle mismatch issue
On Tue, Jan 14, 2014 at 10:16 PM, Mark H. Wood mw...@iupui.edu wrote: The documentation is correct but incomplete. You do not have to shut down Tomcat; you have to shut down the instance of DSpace that you are restoring. If DSpace is the only application running on that Tomcat instance, then it's easiest to shut down Tomcat; if not, there's no need to bounce other applications along with DSpace. That's true - in theory, you don't to restart Tomcat. However, as long as DSpace is the only application under your Tomcat, I (and all DSpace admins I know) still recommend to restart Tomcat. By not restating Tomcat you won't gain much in terms of speed, but you might lose in terms of memory leaks and loss of stability. It's all just anecdotal experience. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Item ID and handle mismatch issue
On Wed, Jan 15, 2014 at 1:49 PM, helix84 heli...@centrum.sk wrote: On Tue, Jan 14, 2014 at 10:16 PM, Mark H. Wood mw...@iupui.edu wrote: The documentation is correct but incomplete. You do not have to shut down Tomcat; you have to shut down the instance of DSpace that you are restoring. If DSpace is the only application running on that Tomcat instance, then it's easiest to shut down Tomcat; if not, there's no need to bounce other applications along with DSpace. That's true - in theory, you don't to restart Tomcat. However, as long as DSpace is the only application under your Tomcat, I (and all DSpace admins I know) still recommend to restart Tomcat. By not restating Tomcat you won't gain much in terms of speed, but you might lose in terms of memory leaks and loss of stability. It's all just anecdotal experience. Sorry, I did not read this in context of running update-sequences.sql. In that case, you just need to ensure that DSpace doesn't create new objects in the database, so it is enough to stop the DSpace webapps. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
[Dspace-tech] Item ID and handle mismatch issue
I recently moved to DSpace 4.0 from 3.x. I set up an empty Dspace 4.0 system, did an AIP backup of the whole 3.x site and then restored the site into the new system. It's been fine for the most part, but when adding an item recently, I got a error at the end of the submission process, saying there was a problem assigning handle x/1623, which isn't surprising since that handle is in use. Upon closer inspection, I see that the ID of my new item is 1623. It did end up getting assigned an available handle x/1631 (which is our highest assigned handle so far), but obviously there was a bump in the road on the way there. We did have a handful of deleted items on our old system, and my guess is that since those weren't brought over, that caused the item id count to be slightly smaller than the handle count. I have added an item before that without any errors, and it did fill in an unused handle in the middle without a problem. Is there anything I should look to do in the code or in the database to prevent this error from popping up again? -- Jason Sherman Systems Librarian University of Science and Arts of Oklahoma 405.574.1340 -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Item ID and handle mismatch issue
Hi Jason, I'm not sure I understood your expectations completely, but some of them seem to be wrong. DSpace is never supposed to assign a handle suffix from a gap. It always assigns highest suffix + 1. The problem might be that the counter is off. In that case shut down Tomcat and run update-sequences.sql. That will reset the sequences so the will return the correct values next time. Running it definitely won't hurt. On Jan 14, 2014 5:08 PM, Jason Sherman jsher...@usao.edu wrote: I recently moved to DSpace 4.0 from 3.x. I set up an empty Dspace 4.0 system, did an AIP backup of the whole 3.x site and then restored the site into the new system. It's been fine for the most part, but when adding an item recently, I got a error at the end of the submission process, saying there was a problem assigning handle x/1623, which isn't surprising since that handle is in use. Upon closer inspection, I see that the ID of my new item is 1623. It did end up getting assigned an available handle x/1631 (which is our highest assigned handle so far), but obviously there was a bump in the road on the way there. We did have a handful of deleted items on our old system, and my guess is that since those weren't brought over, that caused the item id count to be slightly smaller than the handle count. I have added an item before that without any errors, and it did fill in an unused handle in the middle without a problem. Is there anything I should look to do in the code or in the database to prevent this error from popping up again? -- Jason Sherman Systems Librarian University of Science and Arts of Oklahoma 405.574.1340 -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Item ID and handle mismatch issue
On Jan 14, 2014 5:49 PM, Tim Donohue tdono...@duraspace.org wrote: As helix84 mentions, it won't hurt anything: Well, as long as you shut down Tomcat. https://wiki.duraspace.org/display/DSDOC4x/AIP+Backup+and+Restore#AIPBackupandRestore-RestoringEntireSite This documentation is wrong to say that you don't need to shutdown Tomcat. You do, in order to ensure that there are no new items, handles, collections, users etc. added in a transaction parallel to the one where update-sequences.sql runs. The likelihood of conflict may be small, but it easily avoidable. Updating sequences is actually a hack because sequences are meant to be transaction-safe and here we're bypassing that. -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Item ID and handle mismatch issue
Hi Jason, helix84 is correct. It's actually recommended in the AIP Backup Restore Documentation to always run update-sequences.sql after a large restoration (and your situation obviously qualifies). Unfortunately, the restoration process (especially from an empty database) is not always able to ensure that various db sequences are properly set post-restoration. So, there's actually a note (highlighted in yellow) in the docs recommending running update-sequences.sql after a full-site restoration. As helix84 mentions, it won't hurt anything: https://wiki.duraspace.org/display/DSDOC4x/AIP+Backup+and+Restore#AIPBackupandRestore-RestoringEntireSite - Tim On 1/14/2014 10:15 AM, helix84 wrote: Hi Jason, I'm not sure I understood your expectations completely, but some of them seem to be wrong. DSpace is never supposed to assign a handle suffix from a gap. It always assigns highest suffix + 1. The problem might be that the counter is off. In that case shut down Tomcat and run update-sequences.sql. That will reset the sequences so the will return the correct values next time. Running it definitely won't hurt. On Jan 14, 2014 5:08 PM, Jason Sherman jsher...@usao.edu mailto:jsher...@usao.edu wrote: I recently moved to DSpace 4.0 from 3.x. I set up an empty Dspace 4.0 system, did an AIP backup of the whole 3.x site and then restored the site into the new system. It's been fine for the most part, but when adding an item recently, I got a error at the end of the submission process, saying there was a problem assigning handle x/1623, which isn't surprising since that handle is in use. Upon closer inspection, I see that the ID of my new item is 1623. It did end up getting assigned an available handle x/1631 (which is our highest assigned handle so far), but obviously there was a bump in the road on the way there. We did have a handful of deleted items on our old system, and my guess is that since those weren't brought over, that caused the item id count to be slightly smaller than the handle count. I have added an item before that without any errors, and it did fill in an unused handle in the middle without a problem. Is there anything I should look to do in the code or in the database to prevent this error from popping up again? -- Jason Sherman Systems Librarian University of Science and Arts of Oklahoma 405.574.1340 tel:405.574.1340 -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net mailto:DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Item ID and handle mismatch issue
Thanks guys, sorry I apparently failed to RTFM all the way through. I should know better! I followed Helix84's advice (including shutting down tomcat), and I'm currently checking for lingering issues. On Tue, Jan 14, 2014 at 10:58 AM, helix84 heli...@centrum.sk wrote: On Jan 14, 2014 5:49 PM, Tim Donohue tdono...@duraspace.org wrote: As helix84 mentions, it won't hurt anything: Well, as long as you shut down Tomcat. https://wiki.duraspace.org/display/DSDOC4x/AIP+Backup+and+Restore#AIPBackupandRestore-RestoringEntireSite This documentation is wrong to say that you don't need to shutdown Tomcat. You do, in order to ensure that there are no new items, handles, collections, users etc. added in a transaction parallel to the one where update-sequences.sql runs. The likelihood of conflict may be small, but it easily avoidable. Updating sequences is actually a hack because sequences are meant to be transaction-safe and here we're bypassing that. -- Jason Sherman Systems Librarian University of Science and Arts of Oklahoma 405.574.1340 -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Item ID and handle mismatch issue
On Tue, Jan 14, 2014 at 05:58:04PM +0100, helix84 wrote: On Jan 14, 2014 5:49 PM, Tim Donohue tdono...@duraspace.org wrote: As helix84 mentions, it won't hurt anything: Well, as long as you shut down Tomcat. https://wiki.duraspace.org/display/DSDOC4x/AIP+Backup+and+Restore#AIPBackupandRestore-RestoringEntireSite This documentation is wrong to say that you don't need to shutdown Tomcat. You do, in order to ensure that there are no new items, handles, collections, users etc. added in a transaction parallel to the one where update-sequences.sql runs. The likelihood of conflict may be small, but it easily avoidable. Updating sequences is actually a hack because sequences are meant to be transaction-safe and here we're bypassing that. The documentation is correct but incomplete. You do not have to shut down Tomcat; you have to shut down the instance of DSpace that you are restoring. If DSpace is the only application running on that Tomcat instance, then it's easiest to shut down Tomcat; if not, there's no need to bounce other applications along with DSpace. -- Mark H. Wood, Lead System Programmer mw...@iupui.edu Machines should not be friendly. Machines should be obedient. signature.asc Description: Digital signature -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette