Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplicate key error when importing documents very rapidly #4782

Closed
reckart opened this issue Apr 30, 2024 · 0 comments
Closed

Avoid duplicate key error when importing documents very rapidly #4782

reckart opened this issue Apr 30, 2024 · 0 comments
Assignees
Labels
🐛Bug Something isn't working Module: Project Search
Milestone

Comments

@reckart
Copy link
Member

reckart commented Apr 30, 2024

Describe the bug
When importing documents in a very fast sequence and no index has yet been created for a project, a duplicate key error may be triggered as the system tries to persist multiple index metadata records into the database.

Please complete the following information:

  • Version and build ID: 32.0
@reckart reckart added 🐛Bug Something isn't working Module: Project Search labels Apr 30, 2024
@reckart reckart added this to the 32.1 milestone Apr 30, 2024
@reckart reckart self-assigned this Apr 30, 2024
reckart added a commit that referenced this issue Apr 30, 2024
- Fix the issue by only persisting the DB record if we actually change the "invalid" flag
- Bit of cleaning up
reckart added a commit that referenced this issue Apr 30, 2024
…licate-key-error-when-importing-documents-very-rapidly

#4782 - Avoid duplicate key error when importing documents very rapidly
@reckart reckart closed this as completed Apr 30, 2024
reckart added a commit that referenced this issue Apr 30, 2024
* release/32.x:
  #4782 - Avoid duplicate key error when importing documents very rapidly
  #4778 - Links and other active elements in PDFs interfere with annotation and should be disabled
reckart added a commit that referenced this issue May 2, 2024
* main: (110 commits)
  #4787 - When re-merging a document CASMetadata is not retained
  #4785 - Upgrade dependencies
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-1
  #4768 - Bulk curation
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-1
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-32.1
  #4782 - Avoid duplicate key error when importing documents very rapidly
  #4780 - Optionally include example documents in project templates
  #4778 - Links and other active elements in PDFs interfere with annotation and should be disabled
  #4739 - Auto-merge on open document in curation mode
  #4774 - Ability to not reset curation when performing a manual merge (sidebar curation)
  #4772 - Repair to trim whitespace off annotations
  #4769 - Cannot export CAS RDF
  #4768 - Bulk curation
  #4766 - Add ID column to documents table in dev mode
  #4764 - No longer force-enable server-side timings when dev mode is disabled
  #4762 - Re-merging via the curation sidebar always uses the project settings instead of the dialog settings
  ...

% Conflicts:
%	inception/inception-dependencies/pom.xml
%	inception/inception-diam-editor/pom.xml
%	inception/inception-diam-editor/src/main/java/de/tudarmstadt/ukp/inception/diam/sidebar/DiamAnnotationBrowser.java
%	inception/inception-external-editor/src/main/java/de/tudarmstadt/ukp/inception/externaleditor/ExternalAnnotationEditorBase.java
%	inception/inception-remote/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/remoteapi/config/RemoteApiAutoConfiguration.java
%	inception/inception-search-core/src/main/java/de/tudarmstadt/ukp/inception/search/SearchServiceImpl.java
%	inception/inception-sharing/src/main/java/de/tudarmstadt/ukp/inception/sharing/config/InviteServiceAutoConfiguration.java
%	inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
%	inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java
%	inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/curation/config/CurationUIAutoConfiguration.java
%	inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/config/CurationSidebarAutoConfiguration.java
%	inception/inception-ui-dashboard-activity/pom.xml
%	inception/inception-ui-kb/pom.xml
%	inception/inception-workload-dynamic/src/main/java/de/tudarmstadt/ukp/inception/workload/dynamic/annotation/DynamicWorkflowDocumentNavigationActionBarExtension.java
%	pom.xml
reckart added a commit that referenced this issue May 3, 2024
* main: (110 commits)
  #4787 - When re-merging a document CASMetadata is not retained
  #4785 - Upgrade dependencies
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-1
  #4768 - Bulk curation
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-1
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-32.1
  #4782 - Avoid duplicate key error when importing documents very rapidly
  #4780 - Optionally include example documents in project templates
  #4778 - Links and other active elements in PDFs interfere with annotation and should be disabled
  #4739 - Auto-merge on open document in curation mode
  #4774 - Ability to not reset curation when performing a manual merge (sidebar curation)
  #4772 - Repair to trim whitespace off annotations
  #4769 - Cannot export CAS RDF
  #4768 - Bulk curation
  #4766 - Add ID column to documents table in dev mode
  #4764 - No longer force-enable server-side timings when dev mode is disabled
  #4762 - Re-merging via the curation sidebar always uses the project settings instead of the dialog settings
  ...

% Conflicts:
%	inception/inception-dependencies/pom.xml
%	inception/inception-diam-editor/pom.xml
%	inception/inception-diam-editor/src/main/java/de/tudarmstadt/ukp/inception/diam/sidebar/DiamAnnotationBrowser.java
%	inception/inception-external-editor/src/main/java/de/tudarmstadt/ukp/inception/externaleditor/ExternalAnnotationEditorBase.java
%	inception/inception-remote/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/remoteapi/config/RemoteApiAutoConfiguration.java
%	inception/inception-search-core/src/main/java/de/tudarmstadt/ukp/inception/search/SearchServiceImpl.java
%	inception/inception-sharing/src/main/java/de/tudarmstadt/ukp/inception/sharing/config/InviteServiceAutoConfiguration.java
%	inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
%	inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java
%	inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/curation/config/CurationUIAutoConfiguration.java
%	inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/config/CurationSidebarAutoConfiguration.java
%	inception/inception-ui-dashboard-activity/pom.xml
%	inception/inception-ui-kb/pom.xml
%	inception/inception-workload-dynamic/src/main/java/de/tudarmstadt/ukp/inception/workload/dynamic/annotation/DynamicWorkflowDocumentNavigationActionBarExtension.java
%	pom.xml
reckart added a commit that referenced this issue May 3, 2024
* main: (110 commits)
  #4787 - When re-merging a document CASMetadata is not retained
  #4785 - Upgrade dependencies
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-1
  #4768 - Bulk curation
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-33.0-beta-1
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-32.1
  #4782 - Avoid duplicate key error when importing documents very rapidly
  #4780 - Optionally include example documents in project templates
  #4778 - Links and other active elements in PDFs interfere with annotation and should be disabled
  #4739 - Auto-merge on open document in curation mode
  #4774 - Ability to not reset curation when performing a manual merge (sidebar curation)
  #4772 - Repair to trim whitespace off annotations
  #4769 - Cannot export CAS RDF
  #4768 - Bulk curation
  #4766 - Add ID column to documents table in dev mode
  #4764 - No longer force-enable server-side timings when dev mode is disabled
  #4762 - Re-merging via the curation sidebar always uses the project settings instead of the dialog settings
  ...

% Conflicts:
%	inception/inception-dependencies/pom.xml
%	inception/inception-diam-editor/pom.xml
%	inception/inception-diam-editor/src/main/java/de/tudarmstadt/ukp/inception/diam/sidebar/DiamAnnotationBrowser.java
%	inception/inception-external-editor/src/main/java/de/tudarmstadt/ukp/inception/externaleditor/ExternalAnnotationEditorBase.java
%	inception/inception-remote/src/main/java/de/tudarmstadt/ukp/clarin/webanno/webapp/remoteapi/config/RemoteApiAutoConfiguration.java
%	inception/inception-search-core/src/main/java/de/tudarmstadt/ukp/inception/search/SearchServiceImpl.java
%	inception/inception-sharing/src/main/java/de/tudarmstadt/ukp/inception/sharing/config/InviteServiceAutoConfiguration.java
%	inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
%	inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java
%	inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/curation/config/CurationUIAutoConfiguration.java
%	inception/inception-ui-curation/src/main/java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/config/CurationSidebarAutoConfiguration.java
%	inception/inception-ui-dashboard-activity/pom.xml
%	inception/inception-ui-kb/pom.xml
%	inception/inception-workload-dynamic/src/main/java/de/tudarmstadt/ukp/inception/workload/dynamic/annotation/DynamicWorkflowDocumentNavigationActionBarExtension.java
%	pom.xml
@reckart reckart added this to Kanban Aug 7, 2024
@reckart reckart moved this to 🍹 Done in Kanban Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Project Search
Projects
Archived in project
Development

No branches or pull requests

1 participant