Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database error - Daylight Savings time #2664

Open
jrhodesung opened this issue Mar 17, 2022 · 4 comments
Open

Database error - Daylight Savings time #2664

jrhodesung opened this issue Mar 17, 2022 · 4 comments

Comments

@jrhodesung
Copy link

Our Archivist experienced a problem searching their ArchivesSpace build and would receive a database error. It turns out that there was an entry that fell in the missing hour that was skipped because of DST. I found a thread from almost exactly one year ago that had no resolution. Lyrasis would not let me post to the mailing list. Here is the link to that post. http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/2021-March/008281.html

We were able to fix the issue by removing/updating the offending issues in our database.

Our environment is using the latest available version of ArchivesSpace on a CentOs 7 box with an external SQL instance.

@bondurantdt
Copy link

Just a +1 on this, running the SELECT (modifying for current year) and UPDATE queries against the DB appear to have resolved the issue.

@antbrown
Copy link

antbrown commented Oct 5, 2022

Yep, we also ran into this. The search_indexer user in the db was updated with a timestamp falling within DST changeover, resulting in the following error in the logs:

java.lang.IllegalArgumentException: HOUR_OF_DAY: 2 -> 3

Fixed, using the SQL in the link posted above:

# Confirm:
SELECT * FROM user WHERE (user_mtime >= '2022-09-25 02:00:00' and user_mtime <= '2022-09-25 03:00:00') OR (system_mtime >= '2022-09-25 02:00:00' and system_mtime <= '2022-09-25 03:00:00');
# Fix:
UPDATE user set user_mtime = NOW(), system_mtime=NOW() where username = 'search_indexer';

Just posting here in case it adds any keywords and helps someone find the solution.

@jeffnm
Copy link

jeffnm commented Mar 13, 2023

Is there any news about getting a fix for this? It's been an issue for us every year, for years now, and while it's an easy enough manual fix to the database, it would be really nice to avoid it in the future.

@quoideneuf
Copy link
Collaborator

A possible fix is waiting to be merged: #2973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants