Actions
Bug #1998
closedxmera Omnia - Collection #2227: RM related bugs
A NoMethodError occurred in issues#create
Start date:
Due date:
% Done:
100%
Estimated time:
Affected Version:
Compatible Redmine Version:
Pull Request Link:
Description
The error occurs in several scenarios:
- creating a sub issue (see below)
- deleting any issue
A NoMethodError occurred in issues#create:
undefined method `with_advisory_lock!' for Issue:Class
lib/redmine/nested_set/issue_nested_set.rb:185:in `lock_nested_set'
Relative URL:
/projects/infrastruktur/issues
Used parameters:
{"utf8"=>"✓", "authenticity_token"=>"<token>", "form_update_triggered_by"=>"", "back_url"=>"/issues/334", "issue"=>{"is_private"=>"0", "project_id"=>"5", "tracker_id"=>"2", "subject"=>"test", "description"=>"", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "fixed_version_id"=>"", "parent_issue_id"=>"334", "start_date"=>"", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "watcher_user_ids"=>[""]}, "was_default_status"=>"1", "dmsf_attachments"=>{"1"=>{"filename"=>"xss.pdf", "description"=>"", "token"=>"<token>"}}, "commit"=>"Anlegen", "controller"=>"issues", "action"=>"create", "project_id"=>"infrastruktur"}
Database: 10.5.23-MariaDB-0+deb11u1 - Debian 11
Updated by liaham about 1 year ago
- Target version changed from unplanned to 4.2.2
Updated by liaham about 1 year ago
- Target version changed from 4.2.2 to 4.3.0
- Parent task deleted (
#1934)
Updated by liaham about 1 year ago
- Status changed from New to In Progress
- Assignee set to liaham
The error is not reproducible in our development environment.
Updated by liaham about 1 year ago
- Project changed from xmera Omnia to Redmine
- Category deleted (
30) - Target version deleted (
4.3.0)
Updated by liaham about 1 year ago
Happens also when deleting issues:
F, [2024-02-18T10:42:44.627639 #690690] FATAL -- : [f27f5560-801f-4926-aab2-58a782178db9]
[f27f5560-801f-4926-aab2-58a782178db9] NoMethodError (undefined method `with_advisory_lock!' for Issue:Class):
[f27f5560-801f-4926-aab2-58a782178db9]
[f27f5560-801f-4926-aab2-58a782178db9] lib/redmine/nested_set/issue_nested_set.rb:185:in `lock_nested_set'
[f27f5560-801f-4926-aab2-58a782178db9] lib/redmine/nested_set/issue_nested_set.rb:139:in `destroy_children'
[f27f5560-801f-4926-aab2-58a782178db9] app/models/issue.rb:251:in `destroy'
[f27f5560-801f-4926-aab2-58a782178db9] app/controllers/issues_controller.rb:463:in `block in destroy'
[f27f5560-801f-4926-aab2-58a782178db9] app/controllers/issues_controller.rb:461:in `each'
[f27f5560-801f-4926-aab2-58a782178db9] app/controllers/issues_controller.rb:461:in `destroy'
Updated by liaham about 1 year ago
The problem seem to occur especially with Mariadb. See this conversation.
Updated by liaham about 1 year ago
Seemed to be possible with MariaDB 11.1.1: https://mariadb.com/kb/en/set-transaction/#isolation-level.
Updated by liaham about 1 year ago
For mariadb version 10 the variable transaction_isolation
crashes the application.
Variable tx_isolation
does not crash the application but leads to the same error as reported.
Updated by liaham about 1 year ago
Solution:
# config/additional_environment.rb
require 'with_advisory_lock' if Gem::Specification.find_all_by_name('with_advisory_lock').any?
Updated by liaham about 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Actions