Closed koconnor719 closed 8 years ago
Looking in the logs, this is what I see:
ActiveRecord::RecordNotUnique: ERROR: duplicate key value violates unique constraint "awards_pkey"DETAIL: Key (id)=(23563) already exists.
@koconnor719 what were you putting in the awards section? Can you take a screenshot of that section maybe for us to help debug?
It looks like our database is out of sync and not assigning IDs to the awards table correctly. First fix described here fixed the issue locally for me: http://stackoverflow.com/questions/244243/how-to-reset-postgres-primary-key-sequence-when-it-falls-out-of-sync. Will discuss with @ayaleloehr to see if we can implement in production. Am also working on identifying why the sequence got set incorrectly.
After review, I couldn't find a reason the above would have occurred in production so I did some testing. In production, I receive this error intermittently and it doesn't seem to be related to the number of awards or their contents. If it were the above reason, I would expect to receive the error all the time I believe so going to research more.
yes it continues to be intermittent; sometimes it's fine(--and then other times error message...seems like when i check the "draft" box the error happens more frequently.
It was the above issue; since not all IDs were taken in production, the save succeeded with it was incrementing to an unused ID and failed when it tried to use one that was already taken. Both the "awards" and "veterans" tables had this issue. Alex thinks it may have occurred when we moved to AWS. Sequences have been reset and it should work going forward.
When i build my resume using LinkedIn and try to preview and save it (i tested multiple times checking the the draft box not checking the draft box), i get a page error below. note: i tried this about 5 times--one time it did work properly?