Project

General

Profile

Actions

Defect #13086

open

"Mysql::Error: Duplicate entry" in fetching revisions

Added by zam kp almost 12 years ago. Updated almost 12 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Hello Team

When i am integrating one of the redmine project with svn i got Error like this

Please help me

ERROR LOG:

ActiveRecord::StatementInvalid (Mysql::Error: Duplicate entry '98-989' for key 'changesets_repos_rev': INSERT INTO `changesets` (`committer`, `committed_on`, `repository_id`, `revision`, `user_id`, `commit_date`, `scmid`, `comments`) VALUES):
app/models/repository/subversion.rb:67:in `fetch_changesets'
app/models/repository/subversion.rb:66:in `fetch_changesets'
app/models/repository/subversion.rb:65:in `reverse_each'
app/models/repository/subversion.rb:65:in `fetch_changesets'
app/controllers/repositories_controller.rb:92:in `show'
passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) helper-scripts/passenger-spawn-server:99

Rendering /mnt/redmine/home/redmine/redmine/public/500.html (500 Internal Server Error)

also can you Please tell me how the duplicate Id occur??

Thanks


Related issues

Related to Redmine - Defect #2824: MySQL Deadlock Error when showing a big repositoryNew2009-02-24

Actions
Related to Redmine - Defect #13592: ActiveRecord::RecordNotUnique for git repositoryNew

Actions
Actions #1

Updated by Toshi MARUYAMA almost 12 years ago

  • Category set to SCM
Actions #2

Updated by Toshi MARUYAMA almost 12 years ago

  • Subject changed from SVN integration Error with redmine to "Mysql::Error: Duplicate entry" in fetching revisions
Actions #3

Updated by Toshi MARUYAMA almost 12 years ago

zam kp wrote:

also can you Please tell me how the duplicate Id occur??

Because you are running plural fetching revisions processes.
Redmine does not use the lock in fetching revisions.
You can ignore this error.
Because SCM revisions and commit logs are static in most cases.

Actions #4

Updated by Daniel Felix almost 12 years ago

Well, this seem to be closable?

zam kp kp: Is this resolved for you?

Actions #5

Updated by Daniel Felix almost 12 years ago

  • Status changed from New to Needs feedback
Actions #6

Updated by zam kp almost 12 years ago

Hi

The changesets table has the constriant "changesets_repos_rev"created by combining "repository"&"revision"columns.To prevent this error from happening again would it be ok to drop the constraint?

Actions #7

Updated by Etienne Massip almost 12 years ago

zam kp wrote:

The changesets table has the constriant "changesets_repos_rev"created by combining "repository"&"revision"columns.To prevent this error from happening again would it be ok to drop the constraint?

Not a good idea, dropping this unique constraint would create duplicates and mess your data.

Would be better to queue fetches or Mutex them in Redmine code.

Actions #8

Updated by zam kp almost 12 years ago

Ok will check it and update the status

Actions

Also available in: Atom PDF