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

Add proportional staging index dag #3763

Merged
merged 22 commits into from
Feb 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not perform multiple source reindexes simultaneously
stacimc committed Feb 20, 2024
commit 625e4b6c234c575fabd3b960a95e3ea235ee50e8
4 changes: 3 additions & 1 deletion catalog/dags/common/elasticsearch.py
Original file line number Diff line number Diff line change
@@ -96,8 +96,9 @@ def trigger_and_wait_for_reindex(
es_host: str,
max_docs: int | None = None,
slices: Union[int, Literal["auto"]] = "auto",
max_active_tis_per_dagrun: int | None = None,
):
@task
@task(max_active_tis_per_dagrun=max_active_tis_per_dagrun)
def trigger_reindex(
es_host: str,
destination_index: str,
@@ -162,6 +163,7 @@ def _wait_for_reindex(task_id: str, expected_docs: int, es_host: str):
"expected_docs": max_docs,
"es_host": es_host,
},
max_active_tis_per_dagrun=max_active_tis_per_dagrun,
)

trigger_reindex_task >> wait_for_reindex
Original file line number Diff line number Diff line change
@@ -164,6 +164,7 @@ def create_proportional_by_source_staging_index():
# not work reliably and the final proportions may be incorrect.
slices=None,
es_host=es_host,
max_active_tis_per_dagrun=1,
).expand_kwargs(desired_source_counts)

point_alias = es.point_alias(