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

Ingestion bug when using partition key and unsorted data #4925

Open
PieReissyet opened this issue Apr 29, 2024 · 5 comments
Open

Ingestion bug when using partition key and unsorted data #4925

PieReissyet opened this issue Apr 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@PieReissyet
Copy link

Describe the bug
Cant ingest data while using a partition key if number of partition key is high and ndjson data is not sorted per partition key.

Steps to reproduce (if applicable)
Ingest 100M more docs with partition key and unsorted data with default configuration

Expected behavior
Data to be ingested in the index without any issue.

Configuration:
Default configuration, version 0.8.1, please check this thread (https://discord.com/channels/908281611840282624/1233364603480576092) where we discuss the issue and hopefully find a solution for further details

@PieReissyet PieReissyet added the bug Something isn't working label Apr 29, 2024
@fulmicoton
Copy link
Contributor

fulmicoton commented Apr 30, 2024

The number of published document is probably a limitation of the UI. I think we download a partial list of splits metadata and do the computation in javascript.

@PieReissyet Concretely what is the other issue you observe?
Ingest blocks at one point for a few minutes, the push API returns 429, the number of splits then decrease and you can ingest again or something like that?

@fulmicoton
Copy link
Contributor

My hunch is that heaving partitioning makes the load on merge heavier, especially if the merge policy is inappropriate and the number of partiiton is high.

In that case the default setting in merge_concurrency is not sufficient, and you need to increase it.
merge_concurrency is an undocumented property in the indexer config. (in the quickwit.yaml)

You can confirm this hypothesis by looking at the pending merge / ongoing merge curves.
At each commit the pending merge should increase strongly and then decrease as merge get done.

After 10 * commit_timeout large merges will occur and the peak will get even higher.
After 100 * commit_timeout same thing.

The graph should show the number of pending merge to eventually come back to 0 or close to 0 and not diverge.

@PieReissyet
Copy link
Author

PieReissyet commented Apr 30, 2024

Ingestion gets blocked, numbers go crazy on the UI then eventually the insertion keep going after a while. We had use cases where it was stuck for many hours and others where it eventually went back depending on the numbers.

We did not dig the issue more since we managed to get rid of the issue by just sorting our data by partition key.

I will definitely try the merge_concurrency thing if this happen again. Any idea what value should I use ?

@fulmicoton
Copy link
Contributor

Ingestion gets blocked, numbers go crazy on the UI then eventually the insertion keep going after a while.

yes that is in line with what I thought.
If you have prometheus, looking at the graph of pending/ongoing merging should be telling.

We did not dig the issue more since we managed to get rid of the issue by just sorting our data per partition key.
If this is something you can do, it is actually a nice hack to make the work of quickwit much lighter.

merge_concurrency value:

Actually scratch that, I am wrong. merge_concurrency would only help if you had a single index. We do not allow parallel merges within a single pipeline at the moment. Right now the only thing you can do is wait for merges to progress.
What is the volume here?

@PieReissyet
Copy link
Author

We had issues with ~130M docs / ~45go of data uncompressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants