Simplilearn
Member
Hi,
we created a custom endpoint for forum permission and we are using the existing code from xenforo,
we are calling this API from our system through the Kafka cluster. 3 instances are calling this API frequently because of this in the community system we are getting a deadlock error.
can you please help us with this to understand the issue?
we created a custom endpoint for forum permission and we are using the existing code from xenforo,
PHP:
$permissionUpdater = $this->service('XF:UpdatePermissions');
$permissionUpdater->setContent('node', $forumId)->setUser($user);
$permissionUpdater->updatePermissions($permissions);
we are calling this API from our system through the Kafka cluster. 3 instances are calling this API frequently because of this in the community system we are getting a deadlock error.
SQL:
INSERT INTO xf_permission_combination_user_group (permission_combination_id, user_group_id) VALUES (47170,2)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 288 page no 203 n bits 352 index permission_combination_id of table communit_xenforo.xf_permission_combination_user_group trx id 588AA681 lock_mode X insert intention waiting
Record lock
INSERT INTO xf_permission_combination_user_group (permission_combination_id, user_group_id) VALUES (47169,2)
*** (2) HOLDS THE LOCK(S):
can you please help us with this to understand the issue?
Last edited: