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

chore(backfill): add logging for backfill script #1007

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

christopherlim98
Copy link
Contributor

Problem

There is currently no indication of progress when running the backfill script.

Closes #946

Solution

Add logging statements for each stage (i.e. querying from database, creating searchEntriesDataset, indexing the dataset on open search).

As the indexing process itself is done as a bulk operation, it is not very feasible to add a progress bar to track the progress of indexing.

Improvements:

Note: running npx ts-node search-backfill-trigger has a noticeable startup/compilation time as ts-node does type-checking in the background. In production, a faster alternative could be to add a transpile-only flag like npx ts-node -T search-backfill-trigger.

Screenshots

Screenshot 2021-12-22 at 11 56 06 AM

Copy link
Contributor

@wanlingt wanlingt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@christopherlim98 christopherlim98 merged commit c7508b4 into develop Dec 22, 2021
@christopherlim98 christopherlim98 deleted the feat/search/logs branch December 22, 2021 06:09
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

Successfully merging this pull request may close these issues.

Add progress bar to opensearch index backfill script
2 participants