forTEXT / catma

Computer Assisted Text Markup and Analysis
https://www.catma.de
GNU General Public License v3.0
88 stars 8 forks source link

"Disappearing" resources in collaborative projects #250

Closed maltem-za closed 1 year ago

maltem-za commented 2 years ago

A number of projects have been affected by this problem, where a large number of resources are suddenly deleted from the root project when one of the members synchronizes.

When this happens the submodule directories themselves are deleted, but not removed from .gitmodules. I'm not 100% sure about the state of the Git index in all of these cases - it's proving hard to track down the cause and requires a lot of manual intervention to restore things when it happens. I've kept logs of a number of cases that I've resolved.

I'm pretty sure this is somehow related to the (automated) conflict resolution while merging. When I started working on #238 I noticed that conflict resolution for documents was missing. While users can't edit documents, they can delete them, and this can lead to unresolved conflicts that then leave the submodule in an unclean state. I've now started to implement document conflict resolution in the ux-and-bugs branch (esp. 1f8533f97ff8a2696193380962bba66e6ce443c2).

I've also manually tested some conflict scenarios with tags and annotations, and found that these lead to problems:

1.
testuser creates project, adds document, adds tagset with tag, adds annotations, syncs
testuser2 opens project, adds property to tag, modifies one annotation, syncs
testuser deletes tagset, tries to sync
    -> Error loading conflicted Project!
       org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: C:\Code\catma\repo\git\testuser\CATMA_D6871F77-B8C2-4EF1-84CC-86B862E1247E_Alice\CATMA_D6871F77-B8C2-4EF1-84CC-86B862E1247E_Alice_root\tagsets\T_B719B880-F9FE-495E-A701-99630BD51C35\.git

2.
testuser creates project, adds document, adds tagset with tag, adds annotations, syncs
testuser2 opens project
testuser deletes tagset, syncs
testuser2 adds property to tag, modifies one annotation, tries to sync
    -> Error showing next conflict!
       java.lang.NullPointerException
           at de.catma.tag.TagLibrary.getTagPath(TagLibrary.java:136)
           at de.catma.ui.module.project.AnnotationConflictView.initData(AnnotationConflictView.java:86)
           at de.catma.ui.module.project.AnnotationConflictView.<init>(AnnotationConflictView.java:55)
           at de.catma.ui.module.project.ConflictedProjectView.showNextAnnotationConflict(ConflictedProjectView.java:68)
           at de.catma.ui.module.project.ConflictedProjectView.showNextCollectionConflict(ConflictedProjectView.java:54)
           at de.catma.ui.module.project.ConflictedProjectView.showNextConflict(ConflictedProjectView.java:146)
           at de.catma.ui.module.project.ConflictedProjectView.initData(ConflictedProjectView.java:248)
           at de.catma.ui.module.project.ConflictedProjectView.<init>(ConflictedProjectView.java:48)
maltem-za commented 1 year ago

This issue should be resolved with the release of 7.0.0 as we got rid of submodules (see work done as part of #248) .