Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 45,853
    • Issues 45,853
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 854
    • Merge Requests 854
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #38111

Closed
Open
Opened Dec 04, 2019 by Markus Koller@toupeira
  • Report abuse
  • New issue
Report abuse New issue

Retrying ES requests with multiple indices

Summary

This is a follow-up to !17230 / !18254.

Write requests in the forward_to_all_write_targets method in ee/lib/elastic/multi_version_util.rb currently only return the first response with errors, causing the retry logic in ee/app/services/elastic/index_record_service.rb to retry the request on all ES indices, rather than just the failed ones.

The failures could also be different on each ES index, causing an unnoticed indexing gap.

Improvements

Handle retrying per-index, so failures on each index will be checked separately and retried as necessary.

This probably involves moving the retrying logic from our Rails services into the multi-version / Gem extension layer. Maybe this could also be implemented in the upstream gems, though we're currently stuck on old versions.

Also, we currently only implement retrying for es_import / index_document / update_document calls, but not for deletions with delete_document, delete_child_documents, delete_by_query. Retrying deletions could be split out into a separate issue.

Involved components

  • ee/lib/elastic/multi_version_util.rb
  • ee/app/services/elastic/index_record_service.rb
Edited Dec 12, 2019 by Markus Koller

Related issues

  • Discussion
  • Designs
Assignee
Assign to
Backlog
Milestone
Backlog
Assign milestone
Time tracking
None
Due date
None
12
Labels
Accepting merge requests Category:Search Enterprise Edition GitLab Starter P3 S2 backend bug devops::enablement elasticsearch group::search performance
Assign labels
  • View project labels
Reference: gitlab-org/gitlab#38111