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

Unmatched assets between PG <> ES #67

Open
batrov opened this issue Nov 29, 2023 · 2 comments
Open

Unmatched assets between PG <> ES #67

batrov opened this issue Nov 29, 2023 · 2 comments
Assignees

Comments

@batrov
Copy link

batrov commented Nov 29, 2023

Is your feature request related to a problem? Please describe.
Currently, there is a discrepancy between the assets in PG and ES, and the reason for this is unknown. This discrepancy adversely affects search relevancy and user experience, as users are unable to find the assets they are looking for or are presented with assets that are no longer available.

Describe the solution you'd like
Provide a Sync API to recreate ES indexes

  • copy old index to temp index
  • change the alias to temp index
  • delete old index
  • create new index
  • sync the data
  • change the alias to new index
  • delete the temp index

High Level Flow:
image

We will only allow 1 sync job to run for 1 index to prevent the race conditions during the process

@bsushmith
Copy link
Collaborator

bsushmith commented Nov 29, 2023

@batrov @haveiss

there is a discrepancy between the assets in PG and ES, and the reason for this is unknown

Can we try to identify the root cause of this?

I think this new API ,though quite helpful, addresses a different problem and not the root cause itself.

@haveiss
Copy link
Collaborator

haveiss commented Nov 29, 2023

@batrov @haveiss

there is a discrepancy between the assets in PG and ES, and the reason for this is unknown

Can we try to identify the root cause of this?

I think this new API ,though quite helpful, addresses a different problem and not the root cause itself.

a lot of factors that i can think of

  • Tech debt from the past: This issue seems to stem from unresolved technical debt that has accumulated over time.
  • Previous lack of robust asset synchronization: In the past, we did not have a reliable method to ensure that assets would be consistently synchronized between PG and ES. To address this, we have introduced an asynchronous worker that will eventually ensure consistency. (See: feat: add optional async worker backed by PG #45)
  • There's possibility people with access updating data directly to PG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants