Creation of multiples index when adding too many items at the same time #531
Unanswered
AdrienDetoeuf
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
I’m currently using stac-fastapi-elasticsearch v6.3.0 with the DateTime Index Based strategy.
I’ve observed an issue when adding multiple items simultaneously to a single collection. If the index reaches its size threshold during this process, the following bug occurs:
The index is not properly closed because the close operation is triggered multiple times.
This results in multiple aliases being created for the same index and so no more items can be added.
Consequently, several new indexes are created unnecessarily.
Example: Aliases after adding multiple items at once:
items_flatsim items_flatsim_15cf241b-7829-4403-bc32-b5d9a47568f0
items_flatsim_2001-01-01-2001-01-11 items_flatsim_15cf241b-7829-4403-bc32-b5d9a47568f0
items_flatsim_2001-01-01-2001-01-12 items_flatsim_15cf241b-7829-4403-bc32-b5d9a47568f0
items_flatsim_2001-01-01-2001-01-22 items_flatsim_15cf241b-7829-4403-bc32-b5d9a47568f0
items_flatsim_2001-01-01-2001-01-30 items_flatsim_15cf241b-7829-4403-bc32-b5d9a47568f0
items_flatsim_2001-01-01-2001-02-01 items_flatsim_15cf241b-7829-4403-bc32-b5d9a47568f0
Example: Newly created indexes/aliases:
items_flatsim_2001-01-12 items_flatsim_f080f5df-e17a-4d56-9dfe-00ed068e2b89
items_flatsim_2001-01-13 items_flatsim_ee05cd5d-6a99-443a-a2ee-ebda3c4853ed
items_flatsim_2001-01-23 items_flatsim_6e7a8d93-1465-4b71-8fee-0d2df6276648
items_flatsim_2001-01-31 items_flatsim_c7f0c554-9399-42bb-b7bc-0b945e2a446f
items_flatsim_2001-02-02 items_flatsim_5d124f7c-e2e4-4a49-b32a-74edfb7f5e6e
Expected behavior:
The index should be closed only once, and aliases should remain consistent without creating redundant.
Beta Was this translation helpful? Give feedback.
All reactions