Project

General

Profile

Actions

Defect #1098

closed

Upgrading from 0.6.3 to 0.7 , get repsoitiory page info error

Added by jonny zheng over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
2008-04-24
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

SCM : CVS
error info:
ActiveRecord::StatementInvalid (Mysql::Error: Duplicate entry '1-14' for key 'changesets_repos_rev': UPDATE `changesets` SET `committer` = 'cvs_zhengyi', `s
cmid` = NULL, `comments` = 'no message', `revision` = 14, `committed_on` = '2008-04-17 03:18:10', `repository_id` = 1, `commit_date` = '2008-04-17' WHERE `i
d` = 26)

I found in table 'changesets' there are two type format revisions, in 0.6.3 is only number , 0.7 is _number, so I deleted first type rows, page working again,
maybe this is a bug.


Related issues

Is duplicate of Redmine - Defect #996: CVS view ends up with "duplicate key violates unique constraint" after 0.7.0RC1 updateClosedToshi MARUYAMA2008-04-04

Actions
Actions #1

Updated by jonny zheng over 16 years ago

CVS version 1.11.22

Actions #2

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from New to Resolved

r1355 should fix this problem. Can you confirm please ?

Actions #3

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from Resolved to Closed

Should be fixed in 0.7.0 release. Reopen if needed.

Actions #4

Updated by Francis Chong over 16 years ago

  • Status changed from Closed to Reopened

Upgrade from 0.6.0 to 0.7.0, encounter following exception in Repository page:

ActiveRecord::StatementInvalid (PGError: ERROR: duplicate key violates unique constraint "changesets_repos_rev"
: UPDATE changesets SET "scmid" = NULL, "comments" = E'file build.xml was added on branch x on 2008-04-17 10:56:18 +0000', "commit_date" = '2008-04-17', "committer" = E'user', "committed_on" = '2008-04-17 06:15:39.000000', "repository_id" = 2, "revision" = E'795' WHERE "id" = 797):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:150:in `log'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:407:in `execute'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:162:in `update_sql'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:418:in `update_sql'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:49:in `update_without_query_dirty'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `update'
/vendor/rails/activerecord/lib/active_record/base.rb:2247:in `update_without_lock'
/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb:70:in `update_without_callbacks'
/vendor/rails/activerecord/lib/active_record/callbacks.rb:240:in `update_without_timestamps'
/vendor/rails/activerecord/lib/active_record/timestamp.rb:38:in `update'
/vendor/rails/activerecord/lib/active_record/base.rb:2238:in `create_or_update_without_callbacks'
/vendor/rails/activerecord/lib/active_record/callbacks.rb:213:in `create_or_update'
/vendor/rails/activerecord/lib/active_record/base.rb:1972:in `save_without_validation'
/vendor/rails/activerecord/lib/active_record/validations.rb:934:in `save_without_transactions'
/vendor/rails/activerecord/lib/active_record/transactions.rb:108:in `save'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:80:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:100:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:108:in `save'
/vendor/rails/activerecord/lib/active_record/transactions.rb:120:in `rollback_active_record_state!'
/vendor/rails/activerecord/lib/active_record/transactions.rb:108:in `save'
/vendor/rails/activerecord/lib/active_record/validations.rb:955:in `update_attribute'
/app/models/repository/cvs.rb:142:in `fetch_changesets'
/app/models/repository/cvs.rb:141:in `each'
/app/models/repository/cvs.rb:141:in `fetch_changesets'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:80:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:100:in `transaction'
/app/models/repository/cvs.rb:96:in `fetch_changesets'
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:125:in `send'
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:125:in `method_missing'
/app/controllers/repositories_controller.rb:53:in `show'
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `perform_action_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:697:in `call_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
/vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
/vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/rack/adapter/rails.rb:49:in `serve_rails'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/rack/adapter/rails.rb:64:in `call'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/connection.rb:45:in `process'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/connection.rb:31:in `receive_data'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.10.0/lib/eventmachine.rb:1056:in `event_callback'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.10.0/lib/eventmachine.rb:224:in `run_machine'
/usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.10.0/lib/eventmachine.rb:224:in `run'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/backends/base.rb:34:in `start'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/server.rb:136:in `start'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/controllers/controller.rb:70:in `start'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/runner.rb:156:in `send'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/runner.rb:156:in `run_command'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/lib/thin/runner.rb:127:in `run!'
/usr/local/lib/ruby/gems/1.8/gems/thin-0.7.1/bin/thin:6
/usr/local/bin/thin:19:in `load'
/usr/local/bin/thin:19

Rendering /home/postgres/redmine-0.7.0/public/500.html (500 Internal Server Error)

Actions #5

Updated by Jean-Philippe Lang over 16 years ago

Francis, do you get this error every time you go to the Repository page ?
And does your Redmine server run multiple instances (eg. thin cluster) ?

Actions #6

Updated by Francis Chong over 16 years ago

Yes, I get this error every time open repo page.

There is only one instance of server running.

Actions #7

Updated by Leandro Lucarella over 16 years ago

Since 0.7.0 is out, shouldn't this be changed to 0.7.1, so 0.7.0 appears as completed in the Roadmap?

Actions #8

Updated by Jean-Philippe Lang over 16 years ago

  • Target version deleted (0.7)

I can't see how it can happen with a single instance.
Could you try to reload the repository (delete then reload the changesets) ?

Actions #9

Updated by Francis Chong over 16 years ago

Yes, i have clear changes and changesets, it is OK now.

Actions #10

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from Reopened to Closed
  • Target version set to 0.7.1
  • Resolution set to Fixed

OK, thanks for the feedback.

Actions

Also available in: Atom PDF