-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
None
-
Affects Version/s: 8.13.0, 8.20.0, 8.22.0
-
Component/s: DVCS Connector
-
8.13
-
30
-
Severity 3 - Minor
-
5
Issue Summary
This is reproducible on Data Center: yes
Repository synchronization cannot end because on queue exists messages in state SLEEPING.
Steps to Reproduce
Repository that you are going to sync should have messages on queue in status SLEEPING.
Below are sql queries which you can use to detect such repositories.
- Open DVCS admin panel
- Find proper repository
- Trigger soft sync
Expected Results
Repository synchronization will end after some time.
Actual Results
Synchronization for this repository will stuck after a while
Workaround
The same as in: https://jira.atlassian.com/browse/JSWSERVER-21024
How to detect it?
You can run below query:
Postgresql
findAllRepositories
SELECT messageTag."TAG", count(messageTag."TAG") FROM "AO_E8B6CC_MESSAGE" messageMapping JOIN "AO_E8B6CC_MESSAGE_TAG" messageTag ON messageMapping."ID" = messageTag."MESSAGE_ID" JOIN "AO_E8B6CC_MESSAGE_QUEUE_ITEM" messageQueueItem ON messageMapping."ID" = messageQueueItem."MESSAGE_ID" WHERE messageTag."TAG" in (select concat('synchronization-repository-', repo."ID") from "AO_E8B6CC_REPOSITORY_MAPPING" repo where repo."LINKED" is true) AND messageQueueItem."STATE" = 'SLEEPING' group by messageTag."TAG" order by count(messageTag."TAG");
As result will be list of tags. Number at the end of tag it is a repository id. So query shows ids of repositories which are in faulty state.
checkParticularRepository (Remember to change <repoId>)
SELECT count(messagemapping) as "Number of faulty messages" FROM "AO_E8B6CC_MESSAGE" messageMapping JOIN "AO_E8B6CC_MESSAGE_TAG" messageTag ON messageMapping."ID" = messageTag."MESSAGE_ID" JOIN "AO_E8B6CC_MESSAGE_QUEUE_ITEM" messageQueueItem ON messageMapping."ID" = messageQueueItem."MESSAGE_ID" WHERE messageTag."TAG" = concat('synchronization-repository-', (select repo."ID" from "AO_E8B6CC_REPOSITORY_MAPPING" repo where repo."LINKED" is true and repo."ID" = <repoID>)) AND messageQueueItem."STATE" = 'SLEEPING';
As result will be number of messages linked to repository which are in undesired state SLEEPING.
Known root cause of repository faulty state and its messages:
- is blocked by
-
JSWSERVER-21377 DVCS Quick enabling and disabling repository on UI lead to race condition and may lead to faulty state of repository
-
- Short Term Backlog
-
- relates to
-
JSWSERVER-21024 DVCS account with repo having high commit count (or huge org size) gets stuck frequently while syncing
-
- Closed
-
-
JSWSERVER-21359 DVCS Full synchronisation of repository is stuck
-
- Closed
-
- links to